aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-06-22 13:37:28 -0400
committerStefan Monnier2012-06-22 13:37:28 -0400
commitf143bfe38b43ad0a9d817f05c25e418982dca06f (patch)
tree93b989eca0d3fa035e8c72a56ea418b15cfa8ec9
parentac77b21adbddfd143449ef00be15df52f2ede924 (diff)
downloademacs-f143bfe38b43ad0a9d817f05c25e418982dca06f.tar.gz
emacs-f143bfe38b43ad0a9d817f05c25e418982dca06f.zip
* 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.
-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 @@
12012-06-22 Stefan Monnier <monnier@iro.umontreal.ca> 12012-06-22 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * icomplete.el (icomplete-minibuffer-setup, icomplete-completions):
4 Move the non-essential binding to the post/pre-command-hook where it is
5 more obviously correct.
6
3 * subr.el (read-passwd): Don't use a history at all. 7 * subr.el (read-passwd): Don't use a history at all.
4 * savehist.el (savehist-save): Remove password saved accidentally 8 * savehist.el (savehist-save): Remove password saved accidentally
5 because of the above bug. 9 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'."
209 (when (and icomplete-mode (icomplete-simple-completing-p)) 209 (when (and icomplete-mode (icomplete-simple-completing-p))
210 (set (make-local-variable 'completion-show-inline-help) nil) 210 (set (make-local-variable 'completion-show-inline-help) nil)
211 (add-hook 'pre-command-hook 211 (add-hook 'pre-command-hook
212 (lambda () (run-hooks 'icomplete-pre-command-hook)) 212 (lambda () (let ((non-essential t))
213 (run-hooks 'icomplete-pre-command-hook)))
213 nil t) 214 nil t)
214 (add-hook 'post-command-hook 215 (add-hook 'post-command-hook
215 (lambda () (run-hooks 'icomplete-post-command-hook)) 216 (lambda () (let ((non-essential t)) ;E.g. don't prompt for password!
217 (run-hooks 'icomplete-post-command-hook)))
216 nil t) 218 nil t)
217 (run-hooks 'icomplete-minibuffer-setup-hook))) 219 (run-hooks 'icomplete-minibuffer-setup-hook)))
218; 220;
@@ -285,8 +287,7 @@ The displays for unambiguous matches have ` [Matched]' appended
285matches exist. \(Keybindings for uniquely matched commands 287matches exist. \(Keybindings for uniquely matched commands
286are exhibited within the square braces.)" 288are exhibited within the square braces.)"
287 289
288 (let* ((non-essential t) 290 (let* ((md (completion--field-metadata (field-beginning)))
289 (md (completion--field-metadata (field-beginning)))
290 (comps (completion-all-sorted-completions)) 291 (comps (completion-all-sorted-completions))
291 (last (if (consp comps) (last comps))) 292 (last (if (consp comps) (last comps)))
292 (base-size (cdr last)) 293 (base-size (cdr last))