/[emacs]/emacs/lisp/dired-aux.el
ViewVC logotype

Diff of /emacs/lisp/dired-aux.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.102.2.9 by miles, Tue Jul 6 09:47:52 2004 UTC revision 1.102.2.10 by miles, Tue Jul 6 10:00:03 2004 UTC
# Line 255  This calls chmod, thus symbolic modes li Line 255  This calls chmod, thus symbolic modes li
255        (error "chown not supported on this system"))        (error "chown not supported on this system"))
256    (dired-do-chxxx "Owner" dired-chown-program 'chown arg))    (dired-do-chxxx "Owner" dired-chown-program 'chown arg))
257    
258    ;;;###autoload
259  (defun dired-do-touch (&optional arg)  (defun dired-do-touch (&optional arg)
260    "Change the timestamp of the marked (or next ARG) files.    "Change the timestamp of the marked (or next ARG) files.
261  This calls touch."  This calls touch."
# Line 342  Uses the shell command coming from varia Line 343  Uses the shell command coming from varia
343    
344  (defvar dired-file-version-alist)  (defvar dired-file-version-alist)
345    
346    ;;;###autoload
347  (defun dired-clean-directory (keep)  (defun dired-clean-directory (keep)
348    "Flag numerical backups for deletion.    "Flag numerical backups for deletion.
349  Spares `dired-kept-versions' latest versions, and `kept-old-versions' oldest.  Spares `dired-kept-versions' latest versions, and `kept-old-versions' oldest.
# Line 551  the list of file names explicitly with t Line 553  the list of file names explicitly with t
553          (funcall stuff-it files)))))          (funcall stuff-it files)))))
554    
555  ;; This is an extra function so that it can be redefined by ange-ftp.  ;; This is an extra function so that it can be redefined by ange-ftp.
556    ;;;###autoload
557  (defun dired-run-shell-command (command)  (defun dired-run-shell-command (command)
558    (let ((handler    (let ((handler
559           (find-file-name-handler (directory-file-name default-directory)           (find-file-name-handler (directory-file-name default-directory)
# Line 805  Otherwise, the rule is a compression rul Line 808  Otherwise, the rule is a compression rul
808      ;; None of these keys quit - use C-g for that.      ;; None of these keys quit - use C-g for that.
809      ))      ))
810    
811    ;;;###autoload
812  (defun dired-query (qs-var qs-prompt &rest qs-args)  (defun dired-query (qs-var qs-prompt &rest qs-args)
813    ;; Query user and return nil or t.    ;; Query user and return nil or t.
814    ;; Store answer in symbol VAR (which must initially be bound to nil).    ;; Store answer in symbol VAR (which must initially be bound to nil).
# Line 1808  This function takes some pains to confor Line 1812  This function takes some pains to confor
1812          (push (cons dirname switches) dired-switches-alist)))          (push (cons dirname switches) dired-switches-alist)))
1813      (when switches-have-R      (when switches-have-R
1814        (dired-build-subdir-alist switches)        (dired-build-subdir-alist switches)
1815          (setq switches (dired-replace-in-string "R" "" switches))
1816        (dolist (cur-ass dired-subdir-alist)        (dolist (cur-ass dired-subdir-alist)
1817          (let ((cur-dir (car cur-ass)))          (let ((cur-dir (car cur-ass)))
1818            (and (dired-in-this-tree cur-dir dirname)            (and (dired-in-this-tree cur-dir dirname)
                (not (string= cur-dir dirname))  
1819                 (let ((cur-cons (assoc-string cur-dir dired-switches-alist)))                 (let ((cur-cons (assoc-string cur-dir dired-switches-alist)))
1820                   (if cur-cons                   (if cur-cons
1821                       (setcdr cur-cons switches)                       (setcdr cur-cons switches)
# Line 1852  This function takes some pains to confor Line 1856  This function takes some pains to confor
1856                            (> (dired-get-subdir-min elt1)                            (> (dired-get-subdir-min elt1)
1857                               (dired-get-subdir-min elt2)))))))                               (dired-get-subdir-min elt2)))))))
1858    
1859  (defun dired-kill-tree (dirname &optional remember-marks)  (defun dired-kill-tree (dirname &optional remember-marks kill-root)
1860    "Kill all proper subdirs of DIRNAME, excluding DIRNAME itself.    "Kill all proper subdirs of DIRNAME, excluding DIRNAME itself.
1861  With optional arg REMEMBER-MARKS, return an alist of marked files."  Interactively, you can kill DIRNAME as well by using a prefix argument.
1862    (interactive "DKill tree below directory: ")  In interactive use, the command prompts for DIRNAME.
1863    (setq dirname (expand-file-name dirname))  
1864    When called from Lisp, if REMEMBER-MARKS is non-nil, return an alist
1865    of marked files.  If KILL-ROOT is non-nil, kill DIRNAME as well."
1866      (interactive "DKill tree below directory: \ni\nP")
1867      (setq dirname (file-name-as-directory (expand-file-name dirname)))
1868    (let ((s-alist dired-subdir-alist) dir m-alist)    (let ((s-alist dired-subdir-alist) dir m-alist)
1869      (while s-alist      (while s-alist
1870        (setq dir (car (car s-alist))        (setq dir (car (car s-alist))
1871              s-alist (cdr s-alist))              s-alist (cdr s-alist))
1872        (if (and (not (string-equal dir dirname))        (and (or kill-root (not (string-equal dir dirname)))
1873                 (dired-in-this-tree dir dirname)             (dired-in-this-tree dir dirname)
1874                 (dired-goto-subdir dir))             (dired-goto-subdir dir)
1875            (setq m-alist (nconc (dired-kill-subdir remember-marks) m-alist))))             (setq m-alist (nconc (dired-kill-subdir remember-marks) m-alist))))
1876      m-alist))      m-alist))
1877    
1878  (defun dired-insert-subdir-newpos (new-dir)  (defun dired-insert-subdir-newpos (new-dir)

Legend:
Removed from v.1.102.2.9  
changed lines
  Added in v.1.102.2.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26