emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103707: Fix history adding in ido-re


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103707: Fix history adding in ido-read-internal
Date: Tue, 22 Mar 2011 01:48:36 +0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103707
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Tue 2011-03-22 01:48:36 +0800
message:
  Fix history adding in ido-read-internal
      
  Assume, for example, the head of matches is "RSS" and user input is
  "rs". If the user hit RET, "RSS" is selected but "rs" is added to the
  history. This commit fixes this inconsistency.
modified:
  lisp/ChangeLog
  lisp/ido.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-21 16:34:16 +0000
+++ b/lisp/ChangeLog    2011-03-21 17:48:36 +0000
@@ -1,3 +1,8 @@
+2011-03-21  Leo Liu  <address@hidden>
+
+       * ido.el (ido-read-internal): Add ido-selected to history instead
+       of user input.
+
 2011-03-21  Stefan Monnier  <address@hidden>
 
        * subr.el (deferred-action-list, deferred-action-function):

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2011-03-20 10:35:27 +0000
+++ b/lisp/ido.el       2011-03-21 17:48:36 +0000
@@ -1978,7 +1978,9 @@
           (ido-completing-read t)
           (ido-require-match require-match)
           (ido-use-mycompletion-depth (1+ (minibuffer-depth)))
-          (show-paren-mode nil))
+          (show-paren-mode nil)
+          ;; Postpone history adding till later
+          (history-add-new-input nil))
        ;; prompt the user for the file name
        (setq ido-exit nil)
        (setq ido-final-text
@@ -2158,6 +2160,7 @@
 
         (t
          (setq done t))))))
+    (and history (add-to-history history ido-selected))
     ido-selected))
 
 (defun ido-edit-input ()


reply via email to

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