Function: dired-kill-subdir
dired-kill-subdir is an autoloaded, interactive and byte-compiled
function defined in dired-aux.el.gz.
Signature
(dired-kill-subdir &optional REMEMBER-MARKS)
Documentation
Remove all lines of current subdirectory.
Lower levels are unaffected.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;;;###autoload
(defun dired-kill-subdir (&optional remember-marks)
"Remove all lines of current subdirectory.
Lower levels are unaffected."
;; With optional REMEMBER-MARKS, return a mark-alist.
(interactive nil dired-mode)
(let* ((beg (dired-subdir-min))
(end (dired-subdir-max))
(modflag (buffer-modified-p))
(cur-dir (dired-current-directory))
(cons (assoc-string cur-dir dired-switches-alist))
buffer-read-only)
(when (equal cur-dir (expand-file-name default-directory))
(error "Attempt to kill top level directory"))
(prog1
(if remember-marks (dired-remember-marks beg end))
(delete-region beg end)
(if (eobp) ; don't leave final blank line
(delete-char -1))
(dired-unsubdir cur-dir)
(when cons
(setq dired-switches-alist (delete cons dired-switches-alist)))
(restore-buffer-modified-p modflag))))