lisp/ol-bbdb.el: Tiny formatting enhancements

This commit is contained in:
Bastien 2020-05-23 10:32:43 +02:00
parent 5adfb533ce
commit d8dae655f4

View file

@ -98,7 +98,7 @@
(require 'org-macs)
(require 'ol)
;; Declare functions and variables
;;; Declare functions and variables
(declare-function bbdb "ext:bbdb-com" (string elidep))
(declare-function bbdb-company "ext:bbdb-com" (string elidep))
@ -126,9 +126,9 @@
(declare-function diary-ordinal-suffix "diary-lib" (n))
(with-no-warnings (defvar date)) ;unprefixed, from calendar.el
(with-no-warnings (defvar date)) ; unprefixed, from calendar.el
;; Customization
;;; Customization
(defgroup org-bbdb-anniversaries nil
"Customizations for including anniversaries from BBDB into Agenda."
@ -221,7 +221,8 @@ date year)."
:complete #'org-bbdb-complete-link
:store #'org-bbdb-store-link)
;; Implementation
;;; Implementation
(defun org-bbdb-store-link ()
"Store a link to a BBDB database entry."
(when (eq major-mode 'bbdb-mode)
@ -382,7 +383,7 @@ variable to be globally bound."
(text ())
rec recs)
;; we don't want to miss people born on Feb. 29th
;; We don't want to miss people born on Feb. 29th
(when (and (= m 3) (= d 1)
(not (null (gethash (list 2 29) org-bbdb-anniv-hash)))
(not (calendar-leap-year-p y)))
@ -417,8 +418,9 @@ variable to be globally bound."
))
text))
;;; Return list of anniversaries for today and the next n-1 (default: n=7) days.
;;; This is meant to be used in an org file instead of org-bbdb-anniversaries:
;;; Return the list of anniversaries for today and the next n-1
;;; (default: n=7) days. This is meant to be used in an org file
;;; instead of org-bbdb-anniversaries:
;;;
;;; %%(org-bbdb-anniversaries-future)
;;;
@ -444,7 +446,6 @@ for the same event depending on if it occurs in the next few days
or far away in the future."
(let ((delta (- (calendar-absolute-from-gregorian anniv-date)
(calendar-absolute-from-gregorian agenda-date))))
(cond
((= delta 0) " -- today\\&")
((= delta 1) " -- tomorrow\\&")