[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117184: * lisp/minibuffer.el (minibuffer-force-c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r117184: * lisp/minibuffer.el (minibuffer-force-complete-and-exit): |
Date: |
Sun, 01 Jun 2014 02:24:35 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117184
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17545
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-05-31 22:24:23 -0400
message:
* lisp/minibuffer.el (minibuffer-force-complete-and-exit):
Obey minibuffer-default.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/minibuffer.el
minibuffer.el-20091113204419-o5vbwnq5f7feedwu-8622
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-01 01:53:04 +0000
+++ b/lisp/ChangeLog 2014-06-01 02:24:23 +0000
@@ -1,5 +1,8 @@
2014-06-01 Stefan Monnier <address@hidden>
+ * minibuffer.el (minibuffer-force-complete-and-exit):
+ Obey minibuffer-default (bug#17545).
+
* progmodes/js.el (js-indent-line): Don't mix columns and chars
(bug#17619).
@@ -91,8 +94,8 @@
Todo file, make sure we're in the right mode and the buffer local
variables are set.
(todo-make-categories-list, todo-reset-nondiary-marker)
- (todo-reset-done-string, todo-reset-comment-string): After
- processing all Todo files, kill the buffers of those files that
+ (todo-reset-done-string, todo-reset-comment-string):
+ After processing all Todo files, kill the buffers of those files that
weren't being visited before the processing.
(todo-display-as-todo-file, todo-add-to-buffer-list)
(todo-visit-files-commands): Comment out.
@@ -155,8 +158,8 @@
2014-05-21 Dmitry Gutov <address@hidden>
- * emacs-lisp/package.el (package--download-one-archive): Use
- `write-region' instead of `save-buffer' to avoid running various
+ * emacs-lisp/package.el (package--download-one-archive):
+ Use `write-region' instead of `save-buffer' to avoid running various
hooks. (Bug#17155)
(describe-package-1): Same. Insert newline at the end of the
buffer if appropriate.
=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el 2014-05-27 01:25:57 +0000
+++ b/lisp/minibuffer.el 2014-06-01 02:24:23 +0000
@@ -1222,12 +1222,16 @@
(defun minibuffer-force-complete-and-exit ()
"Complete the minibuffer with first of the matches and exit."
(interactive)
- (minibuffer-force-complete)
- (completion--complete-and-exit
- (minibuffer-prompt-end) (point-max) #'exit-minibuffer
- ;; If the previous completion completed to an element which fails
- ;; test-completion, then we shouldn't exit, but that should be rare.
- (lambda () (minibuffer-message "Incomplete"))))
+ (if (and (eq (minibuffer-prompt-end) (point-max))
+ minibuffer-default)
+ ;; Use the provided default if there's one (bug#17545).
+ (minibuffer-complete-and-exit)
+ (minibuffer-force-complete)
+ (completion--complete-and-exit
+ (minibuffer-prompt-end) (point-max) #'exit-minibuffer
+ ;; If the previous completion completed to an element which fails
+ ;; test-completion, then we shouldn't exit, but that should be rare.
+ (lambda () (minibuffer-message "Incomplete")))))
(defun minibuffer-force-complete (&optional start end)
"Complete the minibuffer to an exact match.
@@ -1946,7 +1950,7 @@
"Keymap activated during `completion-in-region'.")
;; It is difficult to know when to exit completion-in-region-mode (i.e. hide
-;; the *Completions*).
+;; the *Completions*). Here's how previous packages did it:
;; - lisp-mode: never.
;; - comint: only do it if you hit SPC at the right time.
;; - pcomplete: pop it down on SPC or after some time-delay.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117184: * lisp/minibuffer.el (minibuffer-force-complete-and-exit):,
Stefan Monnier <=