emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108686: * lisp/icomplete.el (icomple


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108686: * lisp/icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
Date: Fri, 22 Jun 2012 13:37:28 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108686
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-06-22 13:37:28 -0400
message:
  * lisp/icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
  Move the non-essential binding to the post/pre-command-hook where it is
  more obviously correct.
modified:
  lisp/ChangeLog
  lisp/icomplete.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-22 17:30:25 +0000
+++ b/lisp/ChangeLog    2012-06-22 17:37:28 +0000
@@ -1,5 +1,9 @@
 2012-06-22  Stefan Monnier  <address@hidden>
 
+       * icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
+       Move the non-essential binding to the post/pre-command-hook where it is
+       more obviously correct.
+
        * subr.el (read-passwd): Don't use a history at all.
        * savehist.el (savehist-save): Remove password saved accidentally
        because of the above bug.

=== modified file 'lisp/icomplete.el'
--- a/lisp/icomplete.el 2012-02-23 15:36:07 +0000
+++ b/lisp/icomplete.el 2012-06-22 17:37:28 +0000
@@ -209,10 +209,12 @@
   (when (and icomplete-mode (icomplete-simple-completing-p))
     (set (make-local-variable 'completion-show-inline-help) nil)
     (add-hook 'pre-command-hook
-             (lambda () (run-hooks 'icomplete-pre-command-hook))
+             (lambda () (let ((non-essential t))
+                      (run-hooks 'icomplete-pre-command-hook)))
              nil t)
     (add-hook 'post-command-hook
-             (lambda () (run-hooks 'icomplete-post-command-hook))
+             (lambda () (let ((non-essential t)) ;E.g. don't prompt for 
password!
+                      (run-hooks 'icomplete-post-command-hook)))
              nil t)
     (run-hooks 'icomplete-minibuffer-setup-hook)))
 ;
@@ -285,8 +287,7 @@
 matches exist.  \(Keybindings for uniquely matched commands
 are exhibited within the square braces.)"
 
-  (let* ((non-essential t)
-         (md (completion--field-metadata (field-beginning)))
+  (let* ((md (completion--field-metadata (field-beginning)))
         (comps (completion-all-sorted-completions))
          (last (if (consp comps) (last comps)))
          (base-size (cdr last))


reply via email to

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