From: Juri Linkov Date: Wed, 31 Mar 2004 16:29:46 +0000 (+0000) Subject: Add autoload for `dired-do-touch'. X-Git-Tag: ttn-vms-21-2-B4~7013 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=57654b8c0cfb0983c83239817584b0f5fcc59485;p=emacs.git Add autoload for `dired-do-touch'. (dired-touch-program): New var. (dired-mode-map): Bind `dired-do-touch' to T and add menu-item. (dired-no-confirm): Add `touch' to docstring. --- diff --git a/lisp/dired.el b/lisp/dired.el index 6491e11c1e0..966de782dea 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -79,6 +79,9 @@ some of the `ls' switches are not supported; see the doc string of (defvar dired-chmod-program "chmod" "Name of chmod command (usually `chmod').") +(defvar dired-touch-program "touch" + "Name of touch command (usually `touch').") + ;;;###autoload (defcustom dired-ls-F-marks-symlinks nil "*Informs dired about how `ls -lF' marks symbolic links. @@ -919,6 +922,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map "Q" 'dired-do-query-replace-regexp) (define-key map "R" 'dired-do-rename) (define-key map "S" 'dired-do-symlink) + (define-key map "T" 'dired-do-touch) (define-key map "X" 'dired-do-shell-command) (define-key map "Z" 'dired-do-compress) (define-key map "!" 'dired-do-shell-command) @@ -1189,6 +1193,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar operate chmod] '(menu-item "Change Mode..." dired-do-chmod :help "Change mode (attributes) of marked files")) + (define-key map [menu-bar operate touch] + '(menu-item "Change Timestamp..." dired-do-touch + :help "Change timestamp of marked files")) (define-key map [menu-bar operate load] '(menu-item "Load" dired-do-load :help "Load marked Emacs Lisp files")) @@ -2333,8 +2340,8 @@ if there are no flagged files." (defvar dired-no-confirm nil "A list of symbols for commands dired should not confirm. Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress', -`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink' and -`uncompress'.") +`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink', +`touch' and `uncompress'.") (defun dired-mark-pop-up (bufname op-symbol files function &rest args) "Return FUNCTION's result on ARGS after showing which files are marked. @@ -2977,6 +2984,10 @@ This calls chmod, thus symbolic modes like `g+w' are allowed." "Change the owner of the marked (or next ARG) files." t) +(autoload 'dired-do-touch "dired-aux" + "Change the timestamp of the marked (or next ARG) files." + t) + (autoload 'dired-do-print "dired-aux" "Print the marked (or next ARG) files. Uses the shell command coming from variables `lpr-command' and