aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-07-03 15:16:23 +0200
committerStefan Kangas2022-07-03 15:16:23 +0200
commite41ba8ab89a125c91dee672845679f2dec19853a (patch)
tree42245d369919be3d73c31db342c450d07f88a978
parentd5c6f22193402509e315ea3d78daa5e0f69d0ef4 (diff)
downloademacs-e41ba8ab89a125c91dee672845679f2dec19853a.tar.gz
emacs-e41ba8ab89a125c91dee672845679f2dec19853a.zip
Fix dired-goto-subdir prompt
* lisp/dired-aux.el (dired-goto-subdir): Fix prompt and improve docstring. Add interactive mode tag for dired-mode.
-rw-r--r--lisp/dired-aux.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index c403cc5cbde..5f2d1cfc9f0 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3023,18 +3023,20 @@ When called interactively and not on a subdir line, go to this subdir's line."
3023 3023
3024;;;###autoload 3024;;;###autoload
3025(defun dired-goto-subdir (dir) 3025(defun dired-goto-subdir (dir)
3026 "Go to end of header line of DIR in this dired buffer. 3026 "Go to end of header line of inserted directory DIR in this Dired buffer.
3027When called interactively, prompt for the inserted subdirectory
3028to go to.
3029
3027Return value of point on success, otherwise return nil. 3030Return value of point on success, otherwise return nil.
3028The next char is \\n." 3031The next char is \\n."
3029 (interactive 3032 (interactive
3030 (prog1 ; let push-mark display its message 3033 (prog1 ; let push-mark display its message
3031 (list (expand-file-name 3034 (list (expand-file-name
3032 (completing-read "Goto in situ directory: " ; prompt 3035 (completing-read "Goto inserted directory: "
3033 dired-subdir-alist ; table 3036 dired-subdir-alist nil t
3034 nil ; predicate 3037 (dired-current-directory))))
3035 t ; require-match 3038 (push-mark))
3036 (dired-current-directory)))) 3039 dired-mode)
3037 (push-mark)))
3038 (setq dir (file-name-as-directory dir)) 3040 (setq dir (file-name-as-directory dir))
3039 (let ((elt (assoc dir dired-subdir-alist))) 3041 (let ((elt (assoc dir dired-subdir-alist)))
3040 (and elt 3042 (and elt