From: Lars Magne Ingebrigtsen Date: Sat, 22 Apr 2006 00:05:21 +0000 (+0000) Subject: (message-mail-alias-type): Doc fix. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=7e7efece7510cf6686e0edb2cf3e949110f1ea34;p=gnus (message-mail-alias-type): Doc fix. (message-mail-alias-type-p): New function. (message-send): Use it. (message-mode): Ditto. (message-strip-forbidden-properties): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bb161871..e342c827b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2006-04-22 Lars Magne Ingebrigtsen + * message.el (message-mail-alias-type): Doc fix. + (message-mail-alias-type-p): New function. + (message-send): Use it. + (message-mode): Ditto. + (message-strip-forbidden-properties): Ditto. + * ecomplete.el (ecomplete-database-file-coding-system): New variable. (ecomplete-save): Use it. diff --git a/lisp/message.el b/lisp/message.el index fc1c98ae9..e7a6620f7 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1081,8 +1081,9 @@ the prefix.") (defcustom message-mail-alias-type 'abbrev "*What alias expansion type to use in Message buffers. -The default is `abbrev', which uses mailabbrev. nil switches -mail aliases off." +The default is `abbrev', which uses mailabbrev. `ecomplete' uses +an electric completion mode. nil switches mail aliases off. +This can also be a list of values." :group 'message :link '(custom-manual "(message)Mail Aliases") :type '(choice (const :tag "Use Mailabbrev" abbrev) @@ -2524,11 +2525,16 @@ These properties are essential to work, so we should never strip them." (get-text-property pos 'egg-lang) (get-text-property pos 'egg-start))))) +(defsubst message-mail-alias-type-p (type) + (if (atom message-mail-alias-type) + (eq message-mail-alias-type type) + (memq type message-mail-alias-type))) + (defun message-strip-forbidden-properties (begin end &optional old-length) "Strip forbidden properties between BEGIN and END, ignoring the third arg. This function is intended to be called from `after-change-functions'. See also `message-forbidden-properties'." - (when (and (eq message-mail-alias-type 'ecomplete) + (when (and (message-mail-alias-type-p 'ecomplete) (memq this-command message-self-insert-commands)) (message-display-abbrev)) (when (and message-strip-special-text-properties @@ -2621,12 +2627,12 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." nil 'local) ;; Allow mail alias things. (cond - ((eq message-mail-alias-type 'abbrev) + ((message-mail-alias-type-p 'abbrev) (if (fboundp 'mail-abbrevs-setup) (mail-abbrevs-setup) (if (fboundp 'mail-aliases-setup) ; warning avoidance (mail-aliases-setup)))) - ((eq message-mail-alias-type 'ecomplete) + ((message-mail-alias-type-p 'ecomplete) (ecomplete-setup))) (unless buffer-file-name (message-set-auto-save-file-name)) @@ -3612,7 +3618,7 @@ It should typically alter the sending method in some way or other." (run-hooks 'message-sent-hook)) (message "Sending...done") ;; Do ecomplete address snarfing. - (when (eq message-mail-alias-type 'ecomplete) + (when (message-mail-alias-type-p 'ecomplete) (message-put-addresses-in-ecomplete)) ;; Mark the buffer as unmodified and delete auto-save. (set-buffer-modified-p nil)