[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110092: * lisp/dired.el (dired-mark)
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110092: * lisp/dired.el (dired-mark): If the region is active in Transient Mark |
Date: |
Wed, 19 Sep 2012 02:18:06 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110092
fixes bug: http://debbugs.gnu.org/10624
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Wed 2012-09-19 02:18:06 +0300
message:
* lisp/dired.el (dired-mark): If the region is active in Transient Mark
mode, mark all files in the active region. Doc fix.
(dired-unmark, dired-flag-file-deletion, dired-unmark-backward):
Doc fix.
modified:
etc/NEWS
lisp/ChangeLog
lisp/dired.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-09-18 22:57:45 +0000
+++ b/etc/NEWS 2012-09-18 23:18:06 +0000
@@ -463,6 +463,10 @@
`dired-do-chown', `dired-do-touch' pulls the file attributes of the
file at point.
+*** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'),
+`DEL' (`dired-unmark-backward'), `d' (`dired-flag-file-deletion')
+mark/unmark/flag all files in the active region.
+
*** The minibuffer default for `=' (`dired-diff) has changed.
It is now the backup file for the file at point, if one exists, rather
than the file at the mark.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-18 22:57:45 +0000
+++ b/lisp/ChangeLog 2012-09-18 23:18:06 +0000
@@ -1,5 +1,12 @@
2012-09-18 Juri Linkov <address@hidden>
+ * dired.el (dired-mark): If the region is active in Transient Mark
+ mode, mark all files in the active region. Doc fix.
+ (dired-unmark, dired-flag-file-deletion, dired-unmark-backward):
+ Doc fix. (Bug#10624)
+
+2012-09-18 Juri Linkov <address@hidden>
+
* dired-aux.el (dired-do-chxxx, dired-do-chmod): Default file
attributes for M-n are pulled from the file at point.
(dired-do-chgrp, dired-do-chown, dired-do-touch): Doc fix.
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2012-09-18 22:57:45 +0000
+++ b/lisp/dired.el 2012-09-18 23:18:06 +0000
@@ -3097,21 +3097,37 @@
(defun dired-mark (arg)
"Mark the current (or next ARG) files.
If on a subdir headerline, mark all its files except `.' and `..'.
+If the region is active in Transient Mark mode, mark all files
+in the active region.
Use \\[dired-unmark-all-files] to remove all marks
and \\[dired-unmark] on a subdir to remove the marks in
this subdir."
(interactive "P")
- (if (dired-get-subdir)
- (save-excursion (dired-mark-subdir-files))
+ (cond
+ ;; Mark files in the active region.
+ ((and transient-mark-mode mark-active)
+ (save-excursion
+ (let ((beg (region-beginning))
+ (end (region-end)))
+ (dired-mark-files-in-region
+ (progn (goto-char beg) (line-beginning-position))
+ (progn (goto-char end) (line-beginning-position))))))
+ ;; Mark subdir files from the subdir headerline.
+ ((dired-get-subdir)
+ (save-excursion (dired-mark-subdir-files)))
+ ;; Mark the current (or next ARG) files.
+ (t
(let ((inhibit-read-only t))
(dired-repeat-over-lines
(prefix-numeric-value arg)
- (function (lambda () (delete-char 1) (insert dired-marker-char)))))))
+ (function (lambda () (delete-char 1) (insert dired-marker-char))))))))
(defun dired-unmark (arg)
"Unmark the current (or next ARG) files.
-If looking at a subdir, unmark all its files except `.' and `..'."
+If looking at a subdir, unmark all its files except `.' and `..'.
+If the region is active in Transient Mark mode, unmark all files
+in the active region."
(interactive "P")
(let ((dired-marker-char ?\040))
(dired-mark arg)))
@@ -3119,8 +3135,9 @@
(defun dired-flag-file-deletion (arg)
"In Dired, flag the current line's file for deletion.
With prefix arg, repeat over several lines.
-
-If on a subdir headerline, mark all its files except `.' and `..'."
+If on a subdir headerline, flag all its files except `.' and `..'.
+If the region is active in Transient Mark mode, flag all files
+in the active region."
(interactive "P")
(let ((dired-marker-char dired-del-marker))
(dired-mark arg)))
@@ -3128,7 +3145,9 @@
(defun dired-unmark-backward (arg)
"In Dired, move up lines and remove marks or deletion flags there.
Optional prefix ARG says how many lines to unmark/unflag; default
-is one line."
+is one line.
+If the region is active in Transient Mark mode, unmark all files
+in the active region."
(interactive "p")
(dired-unmark (- arg)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110092: * lisp/dired.el (dired-mark): If the region is active in Transient Mark,
Juri Linkov <=