aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-04-14 18:13:16 +0000
committerStefan Monnier2008-04-14 18:13:16 +0000
commit9241efbe694b06bb2b040f8c161137b5c5d6bcfd (patch)
tree7d78b642e6a10ced175fb16372cb0f9b946ca382
parentd8e1753cfd4ab293f45b565bc81dabbb7b61da1a (diff)
downloademacs-9241efbe694b06bb2b040f8c161137b5c5d6bcfd.tar.gz
emacs-9241efbe694b06bb2b040f8c161137b5c5d6bcfd.zip
(tmm-completion-delete-prompt): Don't hardcode point-min==1.
(tmm-add-prompt): Make sure completion-setup-hook is preserved even in case of an error in display-completion-list.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/tmm.el11
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9b26b793005..a43325c7b5b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12008-04-14 Stefan Monnier <monnier@iro.umontreal.ca> 12008-04-14 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * tmm.el (tmm-completion-delete-prompt): Don't hardcode point-min==1.
4 (tmm-add-prompt): Make sure completion-setup-hook is preserved even in
5 case of an error in display-completion-list.
6
3 * filecache.el (file-cache-completions-keymap): Move init from 7 * filecache.el (file-cache-completions-keymap): Move init from
4 file-cache-completion-setup-function into declaration. 8 file-cache-completion-setup-function into declaration.
5 (file-cache-minibuffer-complete): Simplify. 9 (file-cache-minibuffer-complete): Simplify.
diff --git a/lisp/tmm.el b/lisp/tmm.el
index e8d98388afc..b04e0c28d9f 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -345,8 +345,8 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
345 345
346(defun tmm-completion-delete-prompt () 346(defun tmm-completion-delete-prompt ()
347 (set-buffer standard-output) 347 (set-buffer standard-output)
348 (goto-char 1) 348 (goto-char (point-min))
349 (delete-region 1 (search-forward "Possible completions are:\n"))) 349 (delete-region (point) (search-forward "Possible completions are:\n")))
350 350
351(defun tmm-remove-inactive-mouse-face () 351(defun tmm-remove-inactive-mouse-face ()
352 "Remove the mouse-face property from inactive menu items." 352 "Remove the mouse-face property from inactive menu items."
@@ -378,9 +378,10 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
378 (or tmm-completion-prompt 378 (or tmm-completion-prompt
379 (add-hook 'completion-setup-hook 379 (add-hook 'completion-setup-hook
380 'tmm-completion-delete-prompt 'append)) 380 'tmm-completion-delete-prompt 'append))
381 (with-output-to-temp-buffer "*Completions*" 381 (unwind-protect
382 (display-completion-list completions)) 382 (with-output-to-temp-buffer "*Completions*"
383 (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)) 383 (display-completion-list completions))
384 (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)))
384 (set-buffer "*Completions*") 385 (set-buffer "*Completions*")
385 (tmm-remove-inactive-mouse-face) 386 (tmm-remove-inactive-mouse-face)
386 (when tmm-completion-prompt 387 (when tmm-completion-prompt