Mercurial > emacs
diff lisp/simple.el @ 56505:f02b482121bc
(completion-setup-function): Compute the common parts
and the first difference place correctly when
partial-completion-mode is on.
| author | Eli Zaretskii <eliz@gnu.org> |
|---|---|
| date | Fri, 23 Jul 2004 11:52:03 +0000 |
| parents | af62749c9497 |
| children | 05c3cf703d59 159920fd1024 c08afac24467 |
line wrap: on
line diff
--- 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)
