Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
74d0290b
Commit
74d0290b
authored
Jun 22, 1996
by
Richard M. Stallman
Browse files
(choose-completion-string): Don't exit the minibuffer
when a directory name is chosen.
parent
5ac83f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
lisp/simple.el
lisp/simple.el
+9
-1
No files found.
lisp/simple.el
View file @
74d0290b
...
...
@@ -2930,6 +2930,9 @@ With prefix argument N, move N items (negative N means move backward)."
;; Switch to BUFFER and insert the completion choice CHOICE.
;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text
;; to keep. If it is nil, use choose-completion-delete-max-match instead.
;; If BUFFER is the minibuffer, exit the minibuffer
;; unless it is reading a file name and CHOICE is a directory.
(defun choose-completion-string (choice &optional buffer base-size)
(let ((buffer (or buffer completion-reference-buffer)))
;; If BUFFER is a minibuffer, barf unless it's the currently
...
...
@@ -2953,7 +2956,12 @@ With prefix argument N, move N items (negative N means move backward)."
;; If completing for the minibuffer, exit it with this choice.
(and (equal buffer (window-buffer (minibuffer-window)))
minibuffer-completion-table
(exit-minibuffer)))))
;; If this is reading a file name, and the file name chosen
;; is a directory, don't exit the minibuffer.
(if (and (eq minibuffer-completion-table 'read-file-name-internal)
(file-directory-p (buffer-string)))
(select-window (active-minibuffer-window))
(exit-minibuffer))))))
(defun completion-list-mode ()
"Major mode for buffers showing lists of possible completions.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment