aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-01-24 03:51:57 +0000
committerRichard M. Stallman1997-01-24 03:51:57 +0000
commit83434bdaa233dae6183ee1d9f451ff28ca474b8e (patch)
tree50560900e55ebaceb1e674279690ad6dbd5bf065
parent2fa55e202f54007576d48ee36b484384e1e2a34c (diff)
downloademacs-83434bdaa233dae6183ee1d9f451ff28ca474b8e.tar.gz
emacs-83434bdaa233dae6183ee1d9f451ff28ca474b8e.zip
(completion-no-auto-exit): New variable.
(choose-completion-string): Obey compilation-error-regexp-alist.
-rw-r--r--lisp/simple.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 4c93824687b..e414c4607db 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2986,6 +2986,11 @@ it were the arg to `interactive' (which see) to interactively read the value."
2986This is a local variable in the completion list buffer. 2986This is a local variable in the completion list buffer.
2987Initial value is nil to avoid some compiler warnings.") 2987Initial value is nil to avoid some compiler warnings.")
2988 2988
2989(defvar completion-no-auto-exit nil
2990 "Non-nil means `choose-completion-string' should never exit the minibuffer.
2991This also applies to other functions such as `choose-completion'
2992and `mouse-choose-completion'.")
2993
2989(defvar completion-base-size nil 2994(defvar completion-base-size nil
2990 "Number of chars at beginning of minibuffer not involved in completion. 2995 "Number of chars at beginning of minibuffer not involved in completion.
2991This is a local variable in the completion list buffer 2996This is a local variable in the completion list buffer
@@ -3084,7 +3089,8 @@ With prefix argument N, move N items (negative N means move backward)."
3084;; to keep. If it is nil, use choose-completion-delete-max-match instead. 3089;; to keep. If it is nil, use choose-completion-delete-max-match instead.
3085 3090
3086;; If BUFFER is the minibuffer, exit the minibuffer 3091;; If BUFFER is the minibuffer, exit the minibuffer
3087;; unless it is reading a file name and CHOICE is a directory. 3092;; unless it is reading a file name and CHOICE is a directory,
3093;; or completion-no-auto-exit is non-nil.
3088(defun choose-completion-string (choice &optional buffer base-size) 3094(defun choose-completion-string (choice &optional buffer base-size)
3089 (let ((buffer (or buffer completion-reference-buffer))) 3095 (let ((buffer (or buffer completion-reference-buffer)))
3090 ;; If BUFFER is a minibuffer, barf unless it's the currently 3096 ;; If BUFFER is a minibuffer, barf unless it's the currently
@@ -3106,7 +3112,8 @@ With prefix argument N, move N items (negative N means move backward)."
3106 (let ((window (get-buffer-window buffer t))) 3112 (let ((window (get-buffer-window buffer t)))
3107 (set-window-point window (point))) 3113 (set-window-point window (point)))
3108 ;; If completing for the minibuffer, exit it with this choice. 3114 ;; If completing for the minibuffer, exit it with this choice.
3109 (and (equal buffer (window-buffer (minibuffer-window))) 3115 (and (not completion-no-auto-exit)
3116 (equal buffer (window-buffer (minibuffer-window)))
3110 minibuffer-completion-table 3117 minibuffer-completion-table
3111 ;; If this is reading a file name, and the file name chosen 3118 ;; If this is reading a file name, and the file name chosen
3112 ;; is a directory, don't exit the minibuffer. 3119 ;; is a directory, don't exit the minibuffer.