From da0bed93994ac873055a26e73b1205819bddc84b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 2 Dec 2008 07:08:35 +0000 Subject: [PATCH] (PC-do-completion): Fix leftover bug from Emacs-21 when the prompt was added to the minibuffer. --- lisp/ChangeLog | 5 +++++ lisp/complete.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2823fcf541f..a2fdb6f9fd8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-12-02 Stefan Monnier + + * complete.el (PC-do-completion): Fix leftover bug from Emacs-21 when + the prompt was added to the minibuffer. + 2008-12-02 Glenn Morris * format.el (format-write-file): Rewrite doc yet again. diff --git a/lisp/complete.el b/lisp/complete.el index b53addf2099..52b8fac577c 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -799,7 +799,8 @@ GOTO-END is non-nil, however, it instead replaces up to END." (if improved ;; We changed it... would it be complete without the space? - (if (test-completion (buffer-substring 1 (1- end)) + (if (test-completion (buffer-substring + (field-beginning) (1- end)) table pred) (delete-region (1- end) end))) -- 2.39.2