* message.el (message-expand-name-function): New user option.
authorueno <ueno>
Tue, 30 Apr 2002 12:41:00 +0000 (12:41 +0000)
committerueno <ueno>
Tue, 30 Apr 2002 12:41:00 +0000 (12:41 +0000)
(message-expand-name): Use it.
* lpath.el: Don't bind lsdb-complete-name and bbdb-complete-name.

lisp/lpath.el
lisp/message.el

index 546a0ae..e1b1554 100644 (file)
@@ -14,7 +14,6 @@
 (maybe-fbind '(babel-fetch
               babel-wash create-image decode-coding-string display-graphic-p
               replace-regexp-in-string
-              bbdb-complete-name
               display-time-event-handler
               find-image font-create-object gnus-mule-get-coding-system
               font-lock-set-defaults
        (t
         '(function-max-args smiley-encode-buffer))))
       (common-fns
-       '(lsdb-complete-name))
+       nil)
       (variables
        (cond
        ((featurep 'xemacs)
index 9134fc2..f87e0a4 100644 (file)
@@ -6142,6 +6142,16 @@ which specify the range to operate on."
   :group 'message
   :type '(alist :key-type regexp :value-type function))
 
+(defcustom message-expand-name-function
+  (if (fboundp 'bbdb-complete-name)
+      'bbdb-complete-name
+    (if (fboundp 'lsdb-complete-name)
+       'lsdb-complete-name
+      'expand-abbrev))
+  "*A function called to expand addresses in field body."
+  :group 'message
+  :type 'function)
+
 (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."
@@ -6206,11 +6216,7 @@ those headers."
            (delete-region (point) (progn (forward-line 3) (point))))))))))
 
 (defun message-expand-name ()
-  (if (fboundp 'bbdb-complete-name)
-      (bbdb-complete-name)
-    (if (fboundp 'lsdb-complete-name)
-       (lsdb-complete-name)
-      (expand-abbrev))))
+  (funcall message-expand-name-function))
 
 ;;; Help stuff.