diff options
author | Luc Teirlinck <teirllm@auburn.edu> | 2004-06-07 21:24:31 +0000 |
---|---|---|
committer | Luc Teirlinck <teirllm@auburn.edu> | 2004-06-07 21:24:31 +0000 |
commit | 79d123adb3824d9952b13251252a87609dbd9018 (patch) | |
tree | 79d30da606d93c8e98b890b063596252e0a2ff2f /lisp/dired-aux.el | |
parent | 0b0dea7bb759a28e629abe3020e0d5e54b1b691d (diff) | |
download | emacs-79d123adb3824d9952b13251252a87609dbd9018.tar.gz |
(dired-do-redisplay, dired-maybe-insert-subdir): Update docstring.
(dired-reset-subdir-switches): New function.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r-- | lisp/dired-aux.el | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index db09fc57fb7..fa859f3d52e 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -891,7 +891,14 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") (defun dired-do-redisplay (&optional arg test-for-subdir) "Redisplay all marked (or next ARG) files. If on a subdir line, redisplay that subdirectory. In that case, -a prefix arg lets you edit the `ls' switches used for the new listing." +a prefix arg lets you edit the `ls' switches used for the new listing. + +Dired remembers switches specified with a prefix arg, so that reverting +the buffer will not reset them. However, using `dired-undo' to re-insert +or delete subdirectories can bypass this machinery. Hence, you sometimes +may have to reset some subdirectory switches after a `dired-undo'. +You can reset all subdirectory switches to the default using +\\<dired-mode-map>\\[dired-reset-subdir-switches]." ;; Moves point if the next ARG files are redisplayed. (interactive "P\np") (if (and test-for-subdir (dired-get-subdir)) @@ -914,6 +921,12 @@ a prefix arg lets you edit the `ls' switches used for the new listing." arg) (dired-move-to-filename) (message "Redisplaying...done"))) + +(defun dired-reset-subdir-switches () + "Set `dired-switches-alist' to nil and revert dired buffer." + (interactive) + (setq dired-switches-alist nil) + (revert-buffer)) (defun dired-update-file-line (file) ;; Delete the current line, and insert an entry for FILE. @@ -1727,7 +1740,14 @@ If it is already present, just move to it (type \\[dired-do-redisplay] to refres With a prefix arg, you may edit the ls switches used for this listing. You can add `R' to the switches to expand the whole tree starting at this subdirectory. -This function takes some pains to conform to `ls -lR' output." +This function takes some pains to conform to `ls -lR' output. + +Dired remembers switches specified with a prefix arg, so that reverting +the buffer will not reset them. However, using `dired-undo' to re-insert +or delete subdirectories can bypass this machinery. Hence, you sometimes +may have to reset some subdirectory switches after a `dired-undo'. +You can reset all subdirectory switches to the default using +\\<dired-mode-map>\\[dired-reset-subdir-switches]." (interactive (list (dired-get-filename) (if current-prefix-arg |