[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102599: * lisp/gnus/message.el: Use
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102599: * lisp/gnus/message.el: Use completion-at-point. |
Date: |
Mon, 06 Dec 2010 21:01:00 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102599
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-06 21:01:00 -0500
message:
* lisp/gnus/message.el: Use completion-at-point.
(message-completion-function): New fun, extracted from message-tab.
(message-mode): Use it for completion-at-point-functions.
(message-tab): Use it and completion-at-point.
modified:
lisp/gnus/ChangeLog
lisp/gnus/message.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-12-07 01:21:09 +0000
+++ b/lisp/gnus/ChangeLog 2010-12-07 02:01:00 +0000
@@ -1,3 +1,10 @@
+2010-12-07 Stefan Monnier <address@hidden>
+
+ * message.el: Use completion-at-point.
+ (message-completion-function): New fun, extracted from message-tab.
+ (message-mode): Use it for completion-at-point-functions.
+ (message-tab): Use it and completion-at-point.
+
2010-12-07 Katsumi Yamaoka <address@hidden>
* shr.el (shr-find-fill-point): Don't break a line after a kinsoku-bol
=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el 2010-12-02 22:25:01 +0000
+++ b/lisp/gnus/message.el 2010-12-07 02:01:00 +0000
@@ -277,7 +277,7 @@
regexp))
(defcustom message-ignored-mail-headers
-
"^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:"
+
"^\\([GF]cc\\|Resent-Fcc\\|Xref\\|X-Draft-From\\|X-Gnus-Agent-Meta-Information\\):"
"*Regexp of headers to be removed unconditionally before mailing."
:group 'message-mail
:group 'message-headers
@@ -2914,6 +2914,7 @@
(mail-aliases-setup))))
((message-mail-alias-type-p 'ecomplete)
(ecomplete-setup)))
+ (add-hook 'completion-at-point-functions 'message-completion-function nil t)
(unless buffer-file-name
(message-set-auto-save-file-name))
(unless (buffer-base-buffer)
@@ -7743,7 +7744,7 @@
:type '(alist :key-type regexp :value-type function))
(defcustom message-expand-name-databases
- (list 'bbdb 'eudc)
+ '(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
@@ -7765,15 +7766,25 @@
Execute function specified by `message-tab-body-function' when not in
those headers."
(interactive)
+ (cond
+ ((if (and (boundp 'completion-fail-discreetly)
+ (fboundp 'completion-at-point))
+ (let ((completion-fail-discreetly t)) (completion-at-point))
+ (funcall (or (message-completion-function) #'ignore)))
+ ;; Completion was performed; nothing else to do.
+ nil)
+ (message-tab-body-function (funcall message-tab-body-function))
+ (t (funcall (or (lookup-key text-mode-map "\t")
+ (lookup-key global-map "\t")
+ 'indent-relative)))))
+
+(defun message-completion-function ()
(let ((alist message-completion-alist))
(while (and alist
(let ((mail-abbrev-mode-regexp (caar alist)))
(not (mail-abbrev-in-expansion-header-p))))
(setq alist (cdr alist)))
- (funcall (or (cdar alist) message-tab-body-function
- (lookup-key text-mode-map "\t")
- (lookup-key global-map "\t")
- 'indent-relative))))
+ (cdar alist)))
(eval-and-compile
(condition-case nil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102599: * lisp/gnus/message.el: Use completion-at-point.,
Stefan Monnier <=