From 19183a29c3703ea293f6025dbb11324e3696a6e8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 8 Aug 1997 22:09:25 +0000 Subject: [PATCH] (completion-setup-function): Don't set completion-base-size when completing in a non-minibuffer. --- lisp/simple.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index f0fba7da342..a00368e47a5 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3507,8 +3507,11 @@ If this function moves point, it can alter the end of that completion.") (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 -- 2.39.2