Mercurial > emacs
comparison lisp/dired-aux.el @ 89956:b9eee0a7bef5
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-25
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-459
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-463
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464
Update from CVS: lisp/progmodes/make-mode.el: Fix comments.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-465
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 23 Jul 2004 04:30:44 +0000 |
parents | 4c90ffeb71c5 6e35421b930d |
children | f2ebccfa87d4 |
comparison
equal
deleted
inserted
replaced
89955:7f8b53f94713 | 89956:b9eee0a7bef5 |
---|---|
161 (let (res) | 161 (let (res) |
162 (dolist (file1 list1) | 162 (dolist (file1 list1) |
163 (unless (let ((list list2)) | 163 (unless (let ((list list2)) |
164 (while (and list | 164 (while (and list |
165 (not (let* ((file2 (car list)) | 165 (not (let* ((file2 (car list)) |
166 (fa1 (caddr file1)) | 166 (fa1 (car (cddr file1))) |
167 (fa2 (caddr file2)) | 167 (fa2 (car (cddr file2))) |
168 (size1 (nth 7 fa1)) | 168 (size1 (nth 7 fa1)) |
169 (size2 (nth 7 fa2)) | 169 (size2 (nth 7 fa2)) |
170 (mtime1 (float-time (nth 5 fa1))) | 170 (mtime1 (float-time (nth 5 fa1))) |
171 (mtime2 (float-time (nth 5 fa2)))) | 171 (mtime2 (float-time (nth 5 fa2)))) |
172 (and | 172 (and |
625 | 625 |
626 ;;;###autoload | 626 ;;;###autoload |
627 (defun dired-do-kill-lines (&optional arg fmt) | 627 (defun dired-do-kill-lines (&optional arg fmt) |
628 "Kill all marked lines (not the files). | 628 "Kill all marked lines (not the files). |
629 With a prefix argument, kill that many lines starting with the current line. | 629 With a prefix argument, kill that many lines starting with the current line. |
630 \(A negative argument kills lines before the current line.) | 630 \(A negative argument kills backward.) |
631 To kill an entire subdirectory, go to its directory header line | 631 If you use this command with a prefix argument to kill the line |
632 and use this command with a prefix argument (the value does not matter)." | 632 for a file that is a directory, which you have inserted in the |
633 Dired buffer as a subdirectory, then it deletes that subdirectory | |
634 from the buffer as well. | |
635 To kill an entire subdirectory \(without killing its line in the | |
636 parent directory), go to its directory header line and use this | |
637 command with a prefix argument (the value does not matter)." | |
633 ;; Returns count of killed lines. FMT="" suppresses message. | 638 ;; Returns count of killed lines. FMT="" suppresses message. |
634 (interactive "P") | 639 (interactive "P") |
635 (if arg | 640 (if arg |
636 (if (dired-get-subdir) | 641 (if (dired-get-subdir) |
637 (dired-kill-subdir) | 642 (dired-kill-subdir) |
638 (dired-kill-line arg)) | 643 (dired-kill-line arg)) |
639 (save-excursion | 644 (save-excursion |
640 (goto-char (point-min)) | 645 (goto-char (point-min)) |
641 (let (buffer-read-only (count 0)) | 646 (let (buffer-read-only |
642 (if (not arg) ; kill marked lines | 647 (count 0) |
643 (let ((regexp (dired-marker-regexp))) | 648 (regexp (dired-marker-regexp))) |
644 (while (and (not (eobp)) | 649 (while (and (not (eobp)) |
645 (re-search-forward regexp nil t)) | 650 (re-search-forward regexp nil t)) |
646 (setq count (1+ count)) | 651 (setq count (1+ count)) |
647 (delete-region (progn (beginning-of-line) (point)) | 652 (delete-region (progn (beginning-of-line) (point)) |
648 (progn (forward-line 1) (point))))) | 653 (progn (forward-line 1) (point)))) |
649 ;; else kill unmarked lines | |
650 (while (not (eobp)) | |
651 (if (or (dired-between-files) | |
652 (not (looking-at "^ "))) | |
653 (forward-line 1) | |
654 (setq count (1+ count)) | |
655 (delete-region (point) (save-excursion | |
656 (forward-line 1) | |
657 (point)))))) | |
658 (or (equal "" fmt) | 654 (or (equal "" fmt) |
659 (message (or fmt "Killed %d line%s.") count (dired-plural-s count))) | 655 (message (or fmt "Killed %d line%s.") count (dired-plural-s count))) |
660 count)))) | 656 count)))) |
661 | 657 |
662 ;;;###end dired-cmd.el | 658 ;;;###end dired-cmd.el |