branch: externals/ebdb
commit 794babceb7af10e132adce6a7f16c404292241a4
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Fix mail field action
* ebdb.el (ebdb-field-mail-compose): New method handling
ebdb-field-action for mail address fields.
---
ebdb.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ebdb.el b/ebdb.el
index dcba11e..300e9a7 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -1042,11 +1042,15 @@ values, by default the search is not handed to the name
field itself."
offered for completion, and 'primary means this address will
be used as the default. Only one of a record's addresses can
be set to 'primary.")
- (actions :initform '(ebdb-mail)))
+ (actions :initform '(ebdb-field-mail-compose)))
:documentation "A field representing a single email address.
The optional \"object-name\" slot can serve as a mail aka."
:human-readable "mail")
+(cl-defmethod ebdb-field-mail-compose ((record ebdb-record-entity)
+ (mail ebdb-field-mail))
+ (ebdb-compose-mail (ebdb-dwim-mail record mail)))
+
(cl-defmethod ebdb-init-field ((mail ebdb-field-mail) &optional record)
(with-slots (aka mail) mail
(ebdb-puthash mail record)