[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 81e23c3 134/350: Simplify record mail citing
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 81e23c3 134/350: Simplify record mail citing |
Date: |
Mon, 14 Aug 2017 11:46:21 -0400 (EDT) |
branch: externals/ebdb
commit 81e23c3b5d58bcf8adabf30b6994b64808fcdc92
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Simplify record mail citing
* ebdb.el (ebdb-records-cite-mail): The inline version is the same, we
only need one :around method. And, instead of checking if records is
non-nil, just use a list specializer for the records argument.
---
ebdb.el | 37 ++++++++++++++-----------------------
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 677a504..edbe275 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4497,21 +4497,14 @@ This is a generic function that dispatches on the value
of
(format "- %s" elt))
list "\n")))
-(cl-defmethod ebdb-records-cite-mail :around ((style (eql inline))
- (records list)
- &context (major-mode org-mode))
- (let ((list (cl-call-next-method)))
- (mapconcat #'identity list " ")))
-
(cl-defmethod ebdb-records-cite-mail
- (_style records &context (major-mode org-mode))
+ (_style (records list) &context (major-mode org-mode))
"Insert RECORDS as a list of org links."
- (when records
- (mapcar (lambda (pair)
- (format "[[mailto:%s][%s]]"
- (slot-value (cdr pair) 'mail)
- (ebdb-string (car pair))))
- records)))
+ (mapcar (lambda (pair)
+ (format "[[mailto:%s][%s]]"
+ (slot-value (cdr pair) 'mail)
+ (ebdb-string (car pair))))
+ records))
(cl-defmethod ebdb-records-cite-mail :around ((style (eql list))
(records list)
@@ -4522,20 +4515,18 @@ This is a generic function that dispatches on the value
of
list "\n")))
(cl-defmethod ebdb-records-cite-mail :around ((style (eql inline))
- (records list)
- &context (major-mode html-mode))
+ (records list))
(let ((list (cl-call-next-method)))
(mapconcat #'identity list " ")))
(cl-defmethod ebdb-records-cite-mail
- (style records &context (major-mode html-mode))
- (when records
- (mapcar
- (lambda (pair)
- (format "<a href=\"mailto:%s>%s</a>"
- (slot-value (cdr pair) 'mail)
- (ebdb-string (car pair))))
- records)))
+ (_style (records list) &context (major-mode html-mode))
+ (mapcar
+ (lambda (pair)
+ (format "<a href=\"mailto:%s>%s</a>"
+ (slot-value (cdr pair) 'mail)
+ (ebdb-string (car pair))))
+ records))
;;; Loading and saving EBDB
- [elpa] externals/ebdb 9b6c88d 167/350: Fix incorrect variable name, (continued)
- [elpa] externals/ebdb 9b6c88d 167/350: Fix incorrect variable name, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dd13813 171/350: Bah, fixups to a19ff0a, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f1448f4 174/350: Remove this empty file, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6479c87 173/350: Remove unused code, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb db930f6 163/350: Compiler-inspired fixes, and removal of old-code references, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 281c61e 154/350: Don't ((lambda ()), Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 4cce4c8 096/350: Simplify role field adoption process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 0910ddd 105/350: Change default of ebdb-default-user-field, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b495e29 083/350: Omnibus changes to display and redisplay, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 29bf304 101/350: Rework MUA window popups, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 81e23c3 134/350: Simplify record mail citing,
Eric Abrahamsen <=
- [elpa] externals/ebdb b661aac 124/350: First generalized version of snarfing, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb aae57ff 139/350: Ensure that extra name field instances go in 'aka slot, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 057c4c0 144/350: Have ebdb-snarf accept optional records argument, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 8d81a19 132/350: Add EBDB record citation, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7662133 140/350: Simplify ebdb-dwim-mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 0cfe1ec 164/350: Provide keybinding for ebdb-format-all-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb bf51b58 161/350: Fix ebdb-delete-redundant-mails, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 279eb56 169/350: Tweaks and additions to manual, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb eea0abf 165/350: VCard export is good enough, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 64b5e43 170/350: Fix autoloads in ebdb.el, Eric Abrahamsen, 2017/08/14