emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110075: Make pcomplete less eager to


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110075: Make pcomplete less eager to add an extra space.
Date: Mon, 17 Sep 2012 22:45:51 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110075
fixes bug: http://debbugs.gnu.org/12092
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2012-09-17 22:45:51 +0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/comint.el
  lisp/pcomplete.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-09-17 11:49:10 +0000
+++ b/lisp/ChangeLog    2012-09-17 14:45:51 +0000
@@ -1,3 +1,11 @@
+2012-09-17  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * mail/rmailmm.el (rmail-mime-toggle-raw): Do rmail-mime-insert

=== modified file 'lisp/comint.el'
--- a/lisp/comint.el    2012-09-17 05:41:04 +0000
+++ b/lisp/comint.el    2012-09-17 14:45:51 +0000
@@ -3161,8 +3161,8 @@
           (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)))))))))

=== modified file 'lisp/pcomplete.el'
--- a/lisp/pcomplete.el 2012-09-17 05:41:04 +0000
+++ b/lisp/pcomplete.el 2012-09-17 14:45:51 +0000
@@ -451,9 +451,12 @@
           (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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]