changeset 19227:84c681e58fd5

(completion-setup-function): Don't set completion-base-size when completing in a non-minibuffer.
author Richard M. Stallman <rms@gnu.org>
date Fri, 08 Aug 1997 22:09:25 +0000
parents c160218de690
children 3e0e9b7e2307
files lisp/simple.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Fri Aug 08 21:32:50 1997 +0000
+++ b/lisp/simple.el	Fri Aug 08 22:09:25 1997 +0000
@@ -3507,8 +3507,11 @@
 		  (goto-char (point-max))
 		  (skip-chars-backward (format "^%c" directory-sep-char))
 		  (- (point) (point-min))))
-	;; Otherwise, the whole input is the text being completed.
-	(setq completion-base-size 0))
+	;; Otherwise, in minibuffer, the whole input is being completed.
+	(save-match-data
+	  (if (string-match "\\` \\*Minibuf-[0-9]+\\*\\'"
+			    (buffer-name mainbuf))
+	      (setq completion-base-size 0))))
       (goto-char (point-min))
       (if window-system
 	  (insert (substitute-command-keys