# HG changeset patch # User Eli Zaretskii # Date 1090583523 0 # Node ID f02b482121bc16343145aa7b9562e677023d68a4 # Parent 8d030ffc0866a44f54d7467c44a0adf81682930d (completion-setup-function): Compute the common parts and the first difference place correctly when partial-completion-mode is on. diff -r 8d030ffc0866 -r f02b482121bc lisp/simple.el --- a/lisp/simple.el Fri Jul 23 01:16:06 2004 +0000 +++ b/lisp/simple.el Fri Jul 23 11:52:03 2004 +0000 @@ -4313,6 +4313,13 @@ (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)