emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/ido.el,v


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/lisp/ido.el,v
Date: Wed, 07 Jun 2006 22:05:06 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kim F. Storm <kfstorm>  06/06/07 22:05:05

Index: ido.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ido.el,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -b -r1.96 -r1.97
--- ido.el      5 Jun 2006 22:22:41 -0000       1.96
+++ ido.el      7 Jun 2006 22:05:05 -0000       1.97
@@ -1538,6 +1538,7 @@
     (define-key map "\C-t" 'ido-toggle-regexp)
     (define-key map "\C-z" 'ido-undo-merge-work-directory)
     (define-key map [(control ?\s)] 'ido-restrict-to-matches)
+    (define-key map [(meta ?\s)] 'ido-take-first-match)
     (define-key map [(control ?@)] 'ido-restrict-to-matches)
     (define-key map [right] 'ido-next-match)
     (define-key map [left] 'ido-prev-match)
@@ -1565,6 +1566,7 @@
     (define-key map "\C-l" 'ido-reread-directory)
     (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir)
     (define-key map [(meta ?b)] 'ido-push-dir)
+    (define-key map [(meta ?v)] 'ido-push-dir-first)
     (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir)
     (define-key map [(meta ?k)] 'ido-forget-work-directory)
     (define-key map [(meta ?m)] 'ido-make-directory)
@@ -2805,12 +2807,28 @@
       (ido-delete-backward-word-updir 1)
     (ido-wide-find-dir)))
 
+(defun ido-take-first-match ()
+  "Use first matching item as input text."
+  (interactive)
+  (when ido-matches
+    (setq ido-text-init (car ido-matches))
+    (setq ido-exit 'refresh)
+    (exit-minibuffer)))
+
 (defun ido-push-dir ()
   "Move to previous directory in file name, push current input on stack."
   (interactive)
   (setq ido-exit 'push)
   (exit-minibuffer))
 
+(defun ido-push-dir-first ()
+  "Move to previous directory in file name, push first match on stack."
+  (interactive)
+  (if ido-matches
+      (setq ido-text (car ido-matches)))
+  (setq ido-exit 'push)
+  (exit-minibuffer))
+
 (defun ido-pop-dir (arg)
   "Pop directory from input stack back to input.
 With \\[universal-argument], pop all element."




reply via email to

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