[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog minibuffer.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog minibuffer.el |
Date: |
Sat, 29 Nov 2008 18:07:18 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/11/29 18:07:18
Modified files:
lisp : ChangeLog minibuffer.el
Log message:
Add and use minibuffer-confirm-exit-commands variable
Revision: address@hidden/emacs--devo--0--patch-1483
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.14879&r2=1.14880
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/minibuffer.el?cvsroot=emacs&r1=1.62&r2=1.63
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.14879
retrieving revision 1.14880
diff -u -b -r1.14879 -r1.14880
--- ChangeLog 29 Nov 2008 06:51:18 -0000 1.14879
+++ ChangeLog 29 Nov 2008 18:07:15 -0000 1.14880
@@ -1,3 +1,8 @@
+2008-11-29 Miles Bader <address@hidden>
+
+ * minibuffer.el (minibuffer-confirm-exit-commands): New variable.
+ (minibuffer-complete-and-exit): Use it.
+
2008-11-29 Chong Yidong <address@hidden>
* term/x-win.el (x-gtk-stock-cache): New hash table.
Index: minibuffer.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- minibuffer.el 29 Nov 2008 02:39:22 -0000 1.62
+++ minibuffer.el 29 Nov 2008 18:07:18 -0000 1.63
@@ -542,6 +542,11 @@
;; through the previous possible completions.
(setq completion-all-sorted-completions (cdr all)))))
+(defvar minibuffer-confirm-exit-commands
+ '(minibuffer-complete minibuffer-complete-word)
+ "A list of commands which cause an immediately following
+`minibuffer-complete-and-exit' to ask for extra confirmation.")
+
(defun minibuffer-complete-and-exit ()
"Exit if the minibuffer contains a valid completion.
Otherwise, try to complete the minibuffer contents. If
@@ -595,7 +600,7 @@
((eq minibuffer-completion-confirm 'confirm-after-completion)
;; Similar to the above, but only if trying to exit immediately
;; after typing TAB (this catches most minibuffer typos).
- (if (eq last-command 'minibuffer-complete)
+ (if (memq last-command minibuffer-confirm-exit-commands)
(progn (minibuffer-message "Confirm")
nil)
(exit-minibuffer)))