branch: externals/ebdb commit 3e6bed6c65f5e7c26d636e61a42472b6d4ef6f27 Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@ericabrahamsen.net>
Borrow changes from notification branch Should have done these here first. * ebdb.el (ebdb-field-anniversary, ebdb-field-id): Put better tags on the customization values, add initforms. (initialize-instance): This almost certainly doesn't matter anymore, as someone would have reported an error otherwise, but this was the wrong function. --- ebdb.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ebdb.el b/ebdb.el index 75eaee3..bf84cc1 100644 --- a/ebdb.el +++ b/ebdb.el @@ -2186,8 +2186,13 @@ If optional arg REPLACE is non-nil, replace any existing notes.") (date :initarg :date :type list - :custom (choice (list integer integer) - (list integer integer integer)) + :custom (choice (list + (integer :tag "Month") + (integer :tag "Day")) + (list + (integer :tag "Month") + (integer :tag "Day") + (integer :tag "Year"))) :documentation "A list of numbers representing a date, either (month day) or (month day year)") @@ -2208,7 +2213,7 @@ This allows for anniversaries where we don't know the year. Eventually this method will go away." (when (integerp (plist-get slots :date)) (setq slots (plist-put slots :date - (calendar + (calendar-gregorian-from-absolute (plist-get slots :date))))) (cl-call-next-method field slots)) @@ -2324,7 +2329,8 @@ Eventually this method will go away." (list (integer :tag "Month") (integer :tag "Day") - (integer :tag "Year")))) + (integer :tag "Year"))) + :initform nil) (expiration-date :initarg :expiration-date :type (or nil list) @@ -2332,7 +2338,8 @@ Eventually this method will go away." (list (integer :tag "Month") (integer :tag "Day") - (integer :tag "Year"))))) + (integer :tag "Year"))) + :initform nil)) :human-readable "id number") (cl-defmethod ebdb-read ((class (subclass ebdb-field-id)) &optional slots obj)