+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
(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)))))))))
(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))