From 55c4a67ca8fe8e5ffd67b70bdb7d278bc99c84ea Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 23 Jul 2004 11:53:07 +0000 Subject: [PATCH] (completion-setup-function): Compute the common parts and the first difference place correctly when partial-completion-mode is on. --- lisp/ChangeLog | 6 ++++++ lisp/simple.el | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3ece6ce0fb8..92246d2f95c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-07-23 Matt Hodges (tiny change) + + * simple.el (completion-setup-function): Compute the common parts + and the first difference place correctly when + partial-completion-mode is on. + 2004-07-22 Vinicius Jose Latorre * ps-print.el: Doc fix. Improve the DSC compliance of the generated diff --git a/lisp/simple.el b/lisp/simple.el index 9d61a390575..1e112b1be74 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4313,6 +4313,13 @@ of the differing parts is, by contrast, slightly highlighted." (if minibuffer-completing-file-name (with-current-buffer mainbuf (setq default-directory (file-name-directory mbuf-contents)))) + ;; If partial-completion-mode is on, point might not be after the + ;; last character in the minibuffer. + ;; FIXME: This still doesn't work if the text to be completed + ;; starts with a `-'. + (when (and partial-completion-mode (not (eobp))) + (setq mbuf-contents + (substring mbuf-contents 0 (- (point) (point-max))))) (with-current-buffer standard-output (completion-list-mode) (make-local-variable 'completion-reference-buffer) -- 2.39.2