emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb f3f9f37 292/350: Move, rename and bind ebdb-mail-y


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb f3f9f37 292/350: Move, rename and bind ebdb-mail-yank
Date: Mon, 14 Aug 2017 11:46:57 -0400 (EDT)

branch: externals/ebdb
commit f3f9f37c46a102c752e860e4f7b3f9040d569e72
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Move, rename and bind ebdb-mail-yank
    
    * ebdb-com.el: Remove ebdb-mail-yank from this file.
    * ebdb-mua.el (ebdb-mua-yank-cc): Put it here, and give it a new name.
---
 ebdb-com.el | 26 --------------------------
 ebdb-mua.el | 26 ++++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index b6fb483..1a582f9 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2106,32 +2106,6 @@ for `ebdb-field-action'."
     (unless (string= "" to)
       (ebdb-compose-mail to subject))))
 
-(defun ebdb-mail-yank ()
-  "CC the people displayed in the *EBDB* buffer on this mail message.
-The primary mail of each of the records currently listed in the
-*EBDB* buffer will be appended to the CC: field of the current buffer."
-  ;; Consider making the guts of this into a method that lives in the
-  ;; different message-sending MUA packages.  All the `derived-mode-p'
-  ;; stuff is a sign...
-
-  ;; Also, collect the addresses that are already in the To: and Cc:
-  ;; headers, and make sure we don't insert duplicates.
-  (interactive)
-  (let ((addresses
-        (with-current-buffer (ebdb-make-buffer-name)
-           (delq nil
-                 (mapcar (lambda (x)
-                           (when-let ((mail (car (ebdb-record-mail (car x) 
t))))
-                             (ebdb-dwim-mail (car x) mail)))
-                         ebdb-records)))))
-    (if (derived-mode-p 'message-mode 'mail-mode)
-       (when addresses
-         (if (derived-mode-p 'message-mode)
-             (message-goto-cc)
-           (mail-cc))
-         (insert (mapconcat #'identity addresses ",\n")))
-      (message "Not in a mail composition buffer"))))
-
 ;;; completion
 
 ;;;###autoload
diff --git a/ebdb-mua.el b/ebdb-mua.el
index cb105c8..1611215 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -1086,6 +1086,32 @@ where it was in the MUA, rather than quitting the EBDB 
buffer."
     (cl-no-applicable-method
      (message "Article snarfing doesn't work in this context."))))
 
+(defun ebdb-mua-yank-cc ()
+  "CC the people displayed in the *EBDB* buffer on this mail message.
+The primary mail of each of the records currently listed in the
+*EBDB* buffer will be appended to the CC: field of the current buffer."
+  ;; Consider making the guts of this into a method that lives in the
+  ;; different message-sending MUA packages.  All the `derived-mode-p'
+  ;; stuff is a sign...
+
+  ;; Also, collect the addresses that are already in the To: and Cc:
+  ;; headers, and make sure we don't insert duplicates.
+  (interactive)
+  (let ((addresses
+        (with-current-buffer (ebdb-make-buffer-name)
+           (delq nil
+                 (mapcar (lambda (x)
+                           (when-let ((mail (car (ebdb-record-mail (car x) 
t))))
+                             (ebdb-dwim-mail (car x) mail)))
+                         ebdb-records)))))
+    (if (derived-mode-p 'message-mode 'mail-mode)
+       (when addresses
+         (if (derived-mode-p 'message-mode)
+             (message-goto-cc)
+           (mail-cc))
+         (insert (mapconcat #'identity addresses ",\n")))
+      (message "Not in a mail composition buffer"))))
+
 ;; Functions for noninteractive use in MUA hooks
 
 ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]