(message-expand-name-databases): New user option.
authorKai Grossjohann <kgrossjo@eu.uu.net>
Tue, 8 Jun 2004 05:48:35 +0000 (05:48 +0000)
committerKai Grossjohann <kgrossjo@eu.uu.net>
Tue, 8 Jun 2004 05:48:35 +0000 (05:48 +0000)
(message-expand-name): Use it.

lisp/ChangeLog
lisp/message.el

index edaf1fe..9920674 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-08  Kai Grossjohann  <kgrossjo@eu.uu.net>
+
+       * message.el (message-expand-name-databases): New user option.
+       (message-expand-name): Use it.
+
 2004-06-07  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-report-articles-resend)
index a7ee7e1..b9d56e5 100644 (file)
@@ -6581,6 +6581,13 @@ which specify the range to operate on."
   :group 'message
   :type '(alist :key-type regexp :value-type function))
 
+(defcustom message-expand-name-databases
+  (list 'bbdb 'eudc)
+  "List of databases to try for name completion (`message-expand-name').
+Each element is a symbol and can be `bbdb' or `eudc'."
+  :group 'message
+  :type '(set (const bbdb) (const eudc)))
+
 (defcustom message-tab-body-function nil
   "*Function to execute when `message-tab' (TAB) is executed in the body.
 If nil, the function bound in `text-mode-map' or `global-map' is executed."
@@ -6646,9 +6653,12 @@ those headers."
            (delete-region (point) (progn (forward-line 3) (point))))))))))
 
 (defun message-expand-name ()
-  (cond ((when (boundp 'eudc-protocol) eudc-protocol)
+  (cond ((and (memq 'eudc message-expand-name-databases)
+                   (boundp 'eudc-protocol)
+                   eudc-protocol)
         (eudc-expand-inline))
-       ((fboundp 'bbdb-complete-name)
+       ((and (memq 'bbdb message-expand-name-databases)
+             (fboundp 'bbdb-complete-name))
         (bbdb-complete-name))
        (t
         (expand-abbrev))))