diff options
| author | Stefan Monnier | 2012-06-22 13:37:28 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-06-22 13:37:28 -0400 |
| commit | f143bfe38b43ad0a9d817f05c25e418982dca06f (patch) | |
| tree | 93b989eca0d3fa035e8c72a56ea418b15cfa8ec9 | |
| parent | ac77b21adbddfd143449ef00be15df52f2ede924 (diff) | |
| download | emacs-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/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/icomplete.el | 9 |
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 @@ | |||
| 1 | 2012-06-22 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-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 | |||
| 285 | matches exist. \(Keybindings for uniquely matched commands | 287 | matches exist. \(Keybindings for uniquely matched commands |
| 286 | are exhibited within the square braces.)" | 288 | are 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)) |