diff options
author | Eli Zaretskii <[email protected]> | 2004-07-23 11:53:07 +0000 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2004-07-23 11:53:07 +0000 |
commit | 55c4a67ca8fe8e5ffd67b70bdb7d278bc99c84ea (patch) | |
tree | 3cd23d0d4796279634521bbdff257ced622c64dd /lisp | |
parent | 9586e1d3a4255c58bf827400ab7c038a3ee988a3 (diff) |
(completion-setup-function): Compute the common parts
and the first difference place correctly when
partial-completion-mode is on.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/simple.el | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3ece6ce0fb..92246d2f95 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-07-23 Matt Hodges <[email protected]> (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 <[email protected]> * ps-print.el: Doc fix. Improve the DSC compliance of the generated diff --git a/lisp/simple.el b/lisp/simple.el index 9d61a39057..1e112b1be7 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) |