(completion-setup-function): Compute the common parts

and the first difference place correctly when
partial-completion-mode is on.
This commit is contained in:
Eli Zaretskii 2004-07-23 11:53:07 +00:00
parent 9586e1d3a4
commit 55c4a67ca8
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-07-23 Matt Hodges <matt@stchem.bham.ac.uk> (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 <viniciusjl@ig.com.br>
* ps-print.el: Doc fix. Improve the DSC compliance of the generated

View file

@ -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)