unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ido-vc-dir anyone?
@ 2011-08-25 15:53 Deniz Dogan
  2011-08-26 10:19 ` Leo
  0 siblings, 1 reply; 6+ messages in thread
From: Deniz Dogan @ 2011-08-25 15:53 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

Attached is a patch suggestion which implements `ido-vc-dir' which is an 
ido replacement for `vc-dir'.  There is some code duplication (copied 
straight from the definition of `vc-dir'), which we probably don't want.

What do you think?

Deniz

[-- Attachment #2: ido-vc-dir.patch --]
[-- Type: text/plain, Size: 1254 bytes --]

=== modified file 'lisp/ido.el'
--- lisp/ido.el	2011-08-04 00:58:07 +0000
+++ lisp/ido.el	2011-08-25 15:52:09 +0000
@@ -1533,6 +1533,7 @@
 	(define-key map [remap insert-file] 'ido-insert-file)
 	(define-key map [remap list-directory] 'ido-list-directory)
 	(define-key map [remap dired] 'ido-dired)
+	(define-key map [remap vc-dir] 'ido-vc-dir)
 	(define-key map [remap find-file-other-window]
           'ido-find-file-other-window)
 	(define-key map [remap find-file-read-only-other-window]
@@ -4245,6 +4246,23 @@
 	(ido-auto-merge-work-directories-length -1))
     (ido-file-internal 'dired 'dired nil "Dired: " 'dir)))
 
+(defun ido-vc-dir (dir &optional backend)
+  "Call `vc-dir' the ido way.
+The directory is selected interactively by typing a substring.
+For details of keybindings, see `vc-dir'."
+  (interactive
+   (list
+    (file-truename
+     (ido-read-directory-name "VC status for directory: "))
+    (if current-prefix-arg
+	(intern
+	 (completing-read
+	  "Use VC backend: "
+	  (mapcar (lambda (b) (list (symbol-name b)))
+		  vc-handled-backends)
+	  nil t nil nil)))))
+  (vc-dir dir backend))
+
 (defun ido-list-directory ()
   "Call `list-directory' the ido way.
 The directory is selected interactively by typing a substring.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-26 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-25 15:53 ido-vc-dir anyone? Deniz Dogan
2011-08-26 10:19 ` Leo
2011-08-26 11:48   ` Deniz Dogan
2011-08-26 12:41     ` Leo
2011-08-26 12:51       ` Richard Riley
2011-08-26 15:05       ` Deniz Dogan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).