[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110940: * lisp/dired.el (dired-ma
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110940: * lisp/dired.el (dired-mark): Add optional arg `interactive'. |
Date: |
Fri, 23 Nov 2012 09:59:43 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110940
fixes bug: http://debbugs.gnu.org/10624
committer: Juri Linkov <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-11-23 09:59:43 +0200
message:
* lisp/dired.el (dired-mark): Add optional arg `interactive'.
Check for `use-region-p' if `interactive' is non-nil.
(dired-unmark, dired-flag-file-deletion): Add optional arg
`interactive'. Call `dired-mark' with the arg `interactive'.
modified:
lisp/ChangeLog
lisp/dired.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-23 07:56:27 +0000
+++ b/lisp/ChangeLog 2012-11-23 07:59:43 +0000
@@ -4,6 +4,14 @@
2012-11-23 Juri Linkov <address@hidden>
+ * dired.el (dired-mark): Add optional arg `interactive'.
+ Check for `use-region-p' if `interactive' is non-nil.
+ (dired-unmark, dired-flag-file-deletion): Add optional arg
+ `interactive'. Call `dired-mark' with the arg `interactive'.
+ (Bug#10624)
+
+2012-11-23 Juri Linkov <address@hidden>
+
* wdired.el: Revert 2012-10-17 change partly and replace it with
Patch by Christopher Schmidt <address@hidden>.
(wdired-finish-edit): Add marks for new file names to
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2012-10-27 09:17:14 +0000
+++ b/lisp/dired.el 2012-11-23 07:59:43 +0000
@@ -3109,7 +3109,7 @@
(insert dired-marker-char)))
(forward-line 1))))
-(defun dired-mark (arg)
+(defun dired-mark (arg &optional interactive)
"Mark the file at point in the Dired buffer.
If the region is active, mark all files in the region.
Otherwise, with a prefix arg, mark files on the next ARG lines.
@@ -3119,10 +3119,10 @@
Use \\[dired-unmark-all-files] to remove all marks
and \\[dired-unmark] on a subdir to remove the marks in
this subdir."
- (interactive "P")
+ (interactive (list current-prefix-arg t))
(cond
;; Mark files in the active region.
- ((and transient-mark-mode mark-active)
+ ((and interactive (use-region-p))
(save-excursion
(let ((beg (region-beginning))
(end (region-end)))
@@ -3139,7 +3139,7 @@
(prefix-numeric-value arg)
(function (lambda () (delete-char 1) (insert dired-marker-char))))))))
-(defun dired-unmark (arg)
+(defun dired-unmark (arg &optional interactive)
"Unmark the file at point in the Dired buffer.
If the region is active, unmark all files in the region.
Otherwise, with a prefix arg, unmark files on the next ARG lines.
@@ -3147,11 +3147,11 @@
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")
+ (interactive (list current-prefix-arg t))
(let ((dired-marker-char ?\040))
- (dired-mark arg)))
+ (dired-mark arg interactive)))
-(defun dired-flag-file-deletion (arg)
+(defun dired-flag-file-deletion (arg &optional interactive)
"In Dired, flag the current line's file for deletion.
If the region is active, flag all files in the region.
Otherwise, with a prefix arg, flag files on the next ARG lines.
@@ -3159,9 +3159,9 @@
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")
+ (interactive (list current-prefix-arg t))
(let ((dired-marker-char dired-del-marker))
- (dired-mark arg)))
+ (dired-mark arg interactive)))
(defun dired-unmark-backward (arg)
"In Dired, move up lines and remove marks or deletion flags there.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110940: * lisp/dired.el (dired-mark): Add optional arg `interactive'.,
Juri Linkov <=