emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106200: * lisp/gnus/message.el: Don'


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106200: * lisp/gnus/message.el: Don't insert TAB in headers with completion.
Date: Wed, 26 Oct 2011 13:27:51 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106200
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9158
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2011-10-26 13:27:51 -0400
message:
  * lisp/gnus/message.el: Don't insert TAB in headers with completion.
  (message-completion-function): Don't fallback on message-tab-body-function
  when message-completion-alist fails to find a completion.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/message.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-10-26 09:25:34 +0000
+++ b/lisp/gnus/ChangeLog       2011-10-26 17:27:51 +0000
@@ -1,3 +1,9 @@
+2011-10-26  Stefan Monnier  <address@hidden>
+
+       * message.el (message-completion-function): Make sure
+       message-tab-body-function is not attempted if one of
+       message-completion-alist fails to find a completion (bug#9158).
+
 2011-10-26  Daiki Ueno  <address@hidden>
 
        * mml.el (mml-quote-region): Quote <#secure> tag.
@@ -7,7 +13,7 @@
 
        * gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24,
        calling a minor mode from Lisp with nil arg enables it, so we have to
-       make the working a bit ambiguous here).
+       make the wording a bit ambiguous here).
 
 2011-10-18  Teodor Zlatanov  <address@hidden>
 

=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el      2011-10-11 05:51:09 +0000
+++ b/lisp/gnus/message.el      2011-10-26 17:27:51 +0000
@@ -7888,7 +7888,11 @@
                (let ((mail-abbrev-mode-regexp (caar alist)))
                  (not (mail-abbrev-in-expansion-header-p))))
       (setq alist (cdr alist)))
-    (cdar alist)))
+    (when (cdar alist)
+      (lexical-let ((fun (cdar alist)))
+        ;; Even if completion fails, return a non-nil value, so as to avoid
+        ;; falling back to message-tab-body-function.
+        (lambda () (funcall fun) 'completion-attempted)))))
 
 (eval-and-compile
   (condition-case nil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]