changeset 54663:9b0161392fe1

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.
author Juri Linkov <juri@jurta.org>
date Wed, 31 Mar 2004 16:29:46 +0000
parents d609a0d94db2
children 2f1445ac3356
files lisp/dired.el
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Wed Mar 31 16:09:18 2004 +0000
+++ b/lisp/dired.el	Wed Mar 31 16:29:46 2004 +0000
@@ -79,6 +79,9 @@
 (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 @@
     (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 @@
     (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 @@
 (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 @@
   "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