summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/icomplete.el9
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5c8bcaecfa0..42342c60386 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2012-06-22 Stefan Monnier <monnier@iro.umontreal.ca>
+ * 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.
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 97a14b12891..a4e3e339470 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -209,10 +209,12 @@ Usually run by inclusion in `minibuffer-setup-hook'."
(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 @@ The displays for unambiguous matches have ` [Matched]' appended
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))