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." |
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. |
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) |
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). |
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) |
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) |