[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100382: * dired-x.el (dired-jump, di
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100382: * dired-x.el (dired-jump, dired-jump-other-window): Add arg |
Date: |
Fri, 21 May 2010 00:33:58 +0300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100382
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Fri 2010-05-21 00:33:58 +0300
message:
* dired-x.el (dired-jump, dired-jump-other-window): Add arg
FILE-NAME to read from the minibuffer when called interactively
with prefix argument instead of using buffer-file-name.
http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00534.html
* dired.el: Update autoloads.
modified:
etc/NEWS
lisp/ChangeLog
lisp/dired-x.el
lisp/dired.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2010-05-18 19:43:04 +0000
+++ b/etc/NEWS 2010-05-20 21:33:58 +0000
@@ -147,6 +147,11 @@
*** The color widget now has a "Choose" button, which allows you to
choose a color via list-colors-display.
+** Dired-x
+
+*** dired-jump and dired-jump-other-window called with a prefix argument
+read a file name from the minibuffer instead of using buffer-file-name.
+
** VC and related modes
*** New VC commands: vc-log-incoming, vc-log-outgoing, vc-find-conflicted-file.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-05-20 15:12:20 +0000
+++ b/lisp/ChangeLog 2010-05-20 21:33:58 +0000
@@ -1,3 +1,12 @@
+2010-05-20 Juri Linkov <address@hidden>
+
+ * dired-x.el (dired-jump, dired-jump-other-window): Add arg
+ FILE-NAME to read from the minibuffer when called interactively
+ with prefix argument instead of using buffer-file-name.
+ http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00534.html
+
+ * dired.el: Update autoloads.
+
2010-05-20 Chong Yidong <address@hidden>
* nxml/nxml-mode.el (nxml-mode-map): Bind C-c / to
=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el 2010-03-30 16:10:14 +0000
+++ b/lisp/dired-x.el 2010-05-20 21:33:58 +0000
@@ -506,16 +506,21 @@
;;; JUMP.
;;;###autoload
-(defun dired-jump (&optional other-window)
+(defun dired-jump (&optional other-window file-name)
"Jump to dired buffer corresponding to current buffer.
If in a file, dired the current directory and move to file's line.
If in Dired already, pop up a level and goto old directory's line.
In case the proper dired file line cannot be found, refresh the dired
-buffer and try again."
- (interactive "P")
- (let* ((file buffer-file-name)
+buffer and try again.
+When OTHER-WINDOW is non-nil, jump to dired buffer in other window.
+Interactively with prefix argument, read FILE-NAME and
+move to its line in dired."
+ (interactive
+ (list nil (and current-prefix-arg
+ (read-file-name "Jump to dired file: "))))
+ (let* ((file (or file-name buffer-file-name))
(dir (if file (file-name-directory file) default-directory)))
- (if (eq major-mode 'dired-mode)
+ (if (and (eq major-mode 'dired-mode) (null file-name))
(progn
(setq dir (dired-current-directory))
(dired-up-directory other-window)
@@ -539,10 +544,12 @@
(dired-omit-mode)
(dired-goto-file file))))))))
-(defun dired-jump-other-window ()
+(defun dired-jump-other-window (&optional file-name)
"Like \\[dired-jump] (`dired-jump') but in other window."
- (interactive)
- (dired-jump t))
+ (interactive
+ (list (and current-prefix-arg
+ (read-file-name "Jump to dired file: "))))
+ (dired-jump t file-name))
;;; OMITTING.
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2010-04-20 13:31:28 +0000
+++ b/lisp/dired.el 2010-05-20 21:33:58 +0000
@@ -3974,7 +3974,7 @@
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
-;;;;;; "2f8d3d5a31b969b181e23c40d6bb16a0")
+;;;;;; "6c492aba3ca0d36a4cd7b02fb9c1cc10")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
@@ -3983,8 +3983,11 @@
If in Dired already, pop up a level and goto old directory's line.
In case the proper dired file line cannot be found, refresh the dired
buffer and try again.
+When OTHER-WINDOW is non-nil, jump to dired buffer in other window.
+Interactively with prefix argument, read FILE-NAME and
+move to its line in dired.
-\(fn &optional OTHER-WINDOW)" t nil)
+\(fn &optional OTHER-WINDOW FILE-NAME)" t nil)
(autoload 'dired-do-relsymlink "dired-x" "\
Relative symlink all marked (or next ARG) files into a directory.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100382: * dired-x.el (dired-jump, dired-jump-other-window): Add arg,
Juri Linkov <=