branch: externals/ebdb
commit b228892213b55202d54903cef85c4fae4bdb3ede
Author: Eric Abrahamsen <e...@ericabrahamsen.net>
Commit: Eric Abrahamsen <e...@ericabrahamsen.net>

    Change interactive behavior of ebdb-mail-aliases
    
    * ebdb-com.el (ebdb-mail-aliases): Remove optional "noisy" argument,
      nothing was using it. Instead use `called-interactively-p' to decide
      whether to add a message.
---
 ebdb-com.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 4789817..1643ef9 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2589,7 +2589,7 @@ If we are past `fill-column', wrap at the previous comma."
 ;;; interface to mail-abbrevs.el.
 
 ;;;###autoload
-(defun ebdb-mail-aliases (&optional noisy)
+(defun ebdb-mail-aliases ()
   "Add aliases from the database to the global alias table.
 \\<ebdb-mode-map>Give records a \"mail alias\" field to define
 an alias for that record.
@@ -2600,8 +2600,7 @@ of all of these people.
 
 This function is automatically called each time an EBDB buffer is
 created.  Alternately, use \\[ebdb-mail-aliases] in an *EBDB*
-buffer to force an update.  With optional argument NOISY, print a
-message when updating is done."
+buffer to force an update."
   (interactive)
 
   ;; Build `mail-aliases' if not yet done.
@@ -2638,7 +2637,8 @@ message when updating is done."
                        ',(mapcar (lambda (r) (ebdb-record-uuid (car r)))
                                  (cdr entry)))))))
 
-  (if noisy (message "EBDB mail alias: rebuilding done")))
+  (when (called-interactively-p 'any)
+    (message "EBDB mail alias: rebuilding done")))
 
 (defun ebdb-mail-abbrev-expand-hook (_alias records)
   "Function substituted for `mail-abbrev-expand-hook' when expanding RECORDS.

Reply via email to