mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Make pcomplete less eager to add an extra space.
* comint.el (comint--complete-file-name-data): Don't add a space if the status is `sole'; that adds a gratuitous space in the completion-cycling case. * pcomplete.el (pcomplete-completions-at-point): Likewise. Fixes: debbugs:12092
This commit is contained in:
parent
caf4040f9e
commit
580bd8683b
@ -1,3 +1,11 @@
|
||||
2012-09-17 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* comint.el (comint--complete-file-name-data): Don't add a space
|
||||
if the status is `sole'; that adds a gratuitous space in the
|
||||
completion-cycling case (Bug#12092).
|
||||
|
||||
* pcomplete.el (pcomplete-completions-at-point): Likewise.
|
||||
|
||||
2012-09-17 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* mail/rmailmm.el (rmail-mime-toggle-raw): Do rmail-mime-insert
|
||||
|
@ -3161,8 +3161,8 @@ See `completion-table-with-quoting' and `comint-unquote-function'.")
|
||||
(complete-with-action action table string pred))))
|
||||
(unless (zerop (length filesuffix))
|
||||
(list :exit-function
|
||||
(lambda (_s finished)
|
||||
(when (memq finished '(sole finished))
|
||||
(lambda (_s status)
|
||||
(when (eq status 'finished)
|
||||
(if (looking-at (regexp-quote filesuffix))
|
||||
(goto-char (match-end 0))
|
||||
(insert filesuffix)))))))))
|
||||
|
@ -451,9 +451,12 @@ Same as `pcomplete' but using the standard completion UI."
|
||||
(list beg (point) table
|
||||
:predicate pred
|
||||
:exit-function
|
||||
;; If completion is finished, add a terminating space.
|
||||
;; We used to also do this if STATUS is `sole', but
|
||||
;; that does not work right when completion cycling.
|
||||
(unless (zerop (length pcomplete-termination-string))
|
||||
(lambda (_s finished)
|
||||
(when (memq finished '(sole finished))
|
||||
(lambda (_s status)
|
||||
(when (eq status 'finished)
|
||||
(if (looking-at
|
||||
(regexp-quote pcomplete-termination-string))
|
||||
(goto-char (match-end 0))
|
||||
|
Loading…
Reference in New Issue
Block a user