aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2010-05-21 00:33:58 +0300
committerJuri Linkov2010-05-21 00:33:58 +0300
commitf5d6548ac93ed6b2c5eb06bfe93e2f531ddd72e0 (patch)
tree5aa2773a7ff331e7e3afeb88607866fc17e960a3
parentf8e6369193666ccd4e38b1ed490042a2a7ce5c91 (diff)
downloademacs-f5d6548ac93ed6b2c5eb06bfe93e2f531ddd72e0.tar.gz
emacs-f5d6548ac93ed6b2c5eb06bfe93e2f531ddd72e0.zip
* 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.
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/dired-x.el23
-rw-r--r--lisp/dired.el7
4 files changed, 34 insertions, 10 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 0d07a160ac1..1c7d9268e5d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -147,6 +147,11 @@ Use the arrow to the left of the option name to toggle visibility.
147*** The color widget now has a "Choose" button, which allows you to 147*** The color widget now has a "Choose" button, which allows you to
148choose a color via list-colors-display. 148choose a color via list-colors-display.
149 149
150** Dired-x
151
152*** dired-jump and dired-jump-other-window called with a prefix argument
153read a file name from the minibuffer instead of using buffer-file-name.
154
150** VC and related modes 155** VC and related modes
151 156
152*** New VC commands: vc-log-incoming, vc-log-outgoing, vc-find-conflicted-file. 157*** New VC commands: vc-log-incoming, vc-log-outgoing, vc-find-conflicted-file.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b7c5c5827e8..b54d50d79fa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12010-05-20 Juri Linkov <juri@jurta.org>
2
3 * dired-x.el (dired-jump, dired-jump-other-window): Add arg
4 FILE-NAME to read from the minibuffer when called interactively
5 with prefix argument instead of using buffer-file-name.
6 http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00534.html
7
8 * dired.el: Update autoloads.
9
12010-05-20 Chong Yidong <cyd@stupidchicken.com> 102010-05-20 Chong Yidong <cyd@stupidchicken.com>
2 11
3 * nxml/nxml-mode.el (nxml-mode-map): Bind C-c / to 12 * nxml/nxml-mode.el (nxml-mode-map): Bind C-c / to
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index aba4b7a7a9d..2dc7475e9e3 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -506,16 +506,21 @@ See variables `dired-texinfo-unclean-extensions',
506;;; JUMP. 506;;; JUMP.
507 507
508;;;###autoload 508;;;###autoload
509(defun dired-jump (&optional other-window) 509(defun dired-jump (&optional other-window file-name)
510 "Jump to dired buffer corresponding to current buffer. 510 "Jump to dired buffer corresponding to current buffer.
511If in a file, dired the current directory and move to file's line. 511If in a file, dired the current directory and move to file's line.
512If in Dired already, pop up a level and goto old directory's line. 512If in Dired already, pop up a level and goto old directory's line.
513In case the proper dired file line cannot be found, refresh the dired 513In case the proper dired file line cannot be found, refresh the dired
514buffer and try again." 514buffer and try again.
515 (interactive "P") 515When OTHER-WINDOW is non-nil, jump to dired buffer in other window.
516 (let* ((file buffer-file-name) 516Interactively with prefix argument, read FILE-NAME and
517move to its line in dired."
518 (interactive
519 (list nil (and current-prefix-arg
520 (read-file-name "Jump to dired file: "))))
521 (let* ((file (or file-name buffer-file-name))
517 (dir (if file (file-name-directory file) default-directory))) 522 (dir (if file (file-name-directory file) default-directory)))
518 (if (eq major-mode 'dired-mode) 523 (if (and (eq major-mode 'dired-mode) (null file-name))
519 (progn 524 (progn
520 (setq dir (dired-current-directory)) 525 (setq dir (dired-current-directory))
521 (dired-up-directory other-window) 526 (dired-up-directory other-window)
@@ -539,10 +544,12 @@ buffer and try again."
539 (dired-omit-mode) 544 (dired-omit-mode)
540 (dired-goto-file file)))))))) 545 (dired-goto-file file))))))))
541 546
542(defun dired-jump-other-window () 547(defun dired-jump-other-window (&optional file-name)
543 "Like \\[dired-jump] (`dired-jump') but in other window." 548 "Like \\[dired-jump] (`dired-jump') but in other window."
544 (interactive) 549 (interactive
545 (dired-jump t)) 550 (list (and current-prefix-arg
551 (read-file-name "Jump to dired file: "))))
552 (dired-jump t file-name))
546 553
547;;; OMITTING. 554;;; OMITTING.
548 555
diff --git a/lisp/dired.el b/lisp/dired.el
index 0dc53bf32c4..ae9915698de 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3974,7 +3974,7 @@ true then the type of the file linked to by FILE is printed instead.
3974;;;*** 3974;;;***
3975 3975
3976;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" 3976;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
3977;;;;;; "2f8d3d5a31b969b181e23c40d6bb16a0") 3977;;;;;; "6c492aba3ca0d36a4cd7b02fb9c1cc10")
3978;;; Generated autoloads from dired-x.el 3978;;; Generated autoloads from dired-x.el
3979 3979
3980(autoload 'dired-jump "dired-x" "\ 3980(autoload 'dired-jump "dired-x" "\
@@ -3983,8 +3983,11 @@ If in a file, dired the current directory and move to file's line.
3983If in Dired already, pop up a level and goto old directory's line. 3983If in Dired already, pop up a level and goto old directory's line.
3984In case the proper dired file line cannot be found, refresh the dired 3984In case the proper dired file line cannot be found, refresh the dired
3985buffer and try again. 3985buffer and try again.
3986When OTHER-WINDOW is non-nil, jump to dired buffer in other window.
3987Interactively with prefix argument, read FILE-NAME and
3988move to its line in dired.
3986 3989
3987\(fn &optional OTHER-WINDOW)" t nil) 3990\(fn &optional OTHER-WINDOW FILE-NAME)" t nil)
3988 3991
3989(autoload 'dired-do-relsymlink "dired-x" "\ 3992(autoload 'dired-do-relsymlink "dired-x" "\
3990Relative symlink all marked (or next ARG) files into a directory. 3993Relative symlink all marked (or next ARG) files into a directory.