emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105937: Accept cons cell HIST arg in


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105937: Accept cons cell HIST arg in ido-read-internal
Date: Tue, 27 Sep 2011 17:28:03 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105937
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Tue 2011-09-27 17:28:03 +0800
message:
  Accept cons cell HIST arg in ido-read-internal
modified:
  lisp/ChangeLog
  lisp/ido.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-27 02:18:32 +0000
+++ b/lisp/ChangeLog    2011-09-27 09:28:03 +0000
@@ -1,3 +1,7 @@
+2011-09-27  Leo Liu  <address@hidden>
+
+       * ido.el (ido-read-internal): Accept cons cell HIST arg.
+
 2011-09-25  Michael Albinus  <address@hidden>
 
        * net/dbus.el (dbus-unregister-object): Don't release services for

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2011-08-04 00:58:07 +0000
+++ b/lisp/ido.el       2011-09-27 09:28:03 +0000
@@ -1826,7 +1826,7 @@
 ;;       e.g. the file name may be ignored or joined with 
ido-current-directory, and
 ;;       the relevant function is called (find-file, write-file, etc).
 
-(defun ido-read-internal (item prompt history &optional default require-match 
initial)
+(defun ido-read-internal (item prompt hist &optional default require-match 
initial)
   "Perform the `ido-read-buffer' and `ido-read-file-name' functions.
 Return the name of a buffer or file selected.
 PROMPT is the prompt to give to the user.
@@ -1984,7 +1984,7 @@
                (read-from-minibuffer (ido-make-prompt item prompt)
                                      (prog1 ido-text-init
                                        (setq ido-text-init nil))
-                                     ido-completion-map nil history))))
+                                     ido-completion-map nil hist))))
       (ido-trace "read-from-minibuffer" ido-final-text)
       (if (get-buffer ido-completion-buffer)
          (kill-buffer ido-completion-buffer))
@@ -2155,7 +2155,12 @@
 
         (t
          (setq done t))))))
-    (add-to-history (or history 'minibuffer-history) ido-selected)
+    (add-to-history (cond
+                    ((consp hist)
+                     (or (car hist) 'minibuffer-history))
+                    (hist hist)
+                    (t 'minibuffer-history))
+                   ido-selected)
     ido-selected))
 
 (defun ido-edit-input ()


reply via email to

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