"/etc/chown"))
"Name of chown command (usually `chown' or `/etc/chown').")
-(defvar dired-chmod-program
- (if (eq system-type 'windows-nt)
- "chmode" "chmod")
- "Name of chmod command (usually `chmod' or `chmode').")
+(defvar dired-chmod-program "chmod"
+ "Name of chmod command (usually `chmod').")
;;;###autoload
(defcustom dired-ls-F-marks-symlinks nil
(define-key map "*\177" 'dired-unmark-backward)
(define-key map "*\C-n" 'dired-next-marked-file)
(define-key map "*\C-p" 'dired-prev-marked-file)
+ (define-key map "*t" 'dired-do-toggle)
;; Lower keys for commands not operating on all the marked files
(define-key map "d" 'dired-flag-file-deletion)
(define-key map "e" 'dired-find-file)
(define-key map "o" 'dired-find-file-other-window)
(define-key map "\C-o" 'dired-display-file)
(define-key map "p" 'dired-previous-line)
- (define-key map "q" 'dired-quit)
+ (define-key map "q" 'quit-window)
(define-key map "s" 'dired-sort-toggle-or-edit)
(define-key map "t" 'dired-do-toggle)
(define-key map "u" 'dired-unmark)
\f
;; Idiosyncratic dired commands that don't deal with marks.
-(defun dired-quit ()
- "Bury the current dired buffer."
- (interactive)
- (bury-buffer))
-
(defun dired-summary ()
"Summarize basic Dired commands and show recent Dired errors."
(interactive)
(dd "[ 0-3][0-9]")
(HH:MM "[ 0-2][0-9]:[0-5][0-9]")
(western (concat "\\(" month s dd "\\|" dd s month "\\)"
- s "\\(" HH:MM "\\|" s yyyy "\\)"))
+ s "\\(" HH:MM "\\|" s yyyy "\\|" yyyy s "\\)"))
(japanese (concat mm k s dd k s "\\(" s HH:MM "\\|" yyyy k "\\)")))
;; Require the previous column to end in a digit.
;; This avoids recognizing `1 may 1997' as a date in the line:
;; Toggle between sort by date/name. Reverts the buffer.
(setq dired-actual-switches
(let (case-fold-search)
- (concat
- "-l"
- (dired-replace-in-string (concat "[-lt"
- dired-ls-sorting-switches "]")
- ""
- dired-actual-switches)
- (if (string-match (concat "[t" dired-ls-sorting-switches "]")
- dired-actual-switches)
- ""
- "t"))))
+ (if (string-match " " dired-actual-switches)
+ ;; New toggle scheme: add/remove a trailing " -t"
+ (if (string-match " -t\\'" dired-actual-switches)
+ (dired-replace-in-string " -t\\'" "" dired-actual-switches)
+ (concat dired-actual-switches " -t"))
+ ;; old toggle scheme: look for some 't' switch and add/remove it
+ (concat
+ "-l"
+ (dired-replace-in-string (concat "[-lt"
+ dired-ls-sorting-switches "]")
+ ""
+ dired-actual-switches)
+ (if (string-match (concat "[t" dired-ls-sorting-switches "]")
+ dired-actual-switches)
+ ""
+ "t")))))
(dired-sort-set-modeline)
(revert-buffer))