[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110686: * lisp/wdired.el (wdired-kee
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110686: * lisp/wdired.el (wdired-keep-marker-rename): New defcustom. |
Date: |
Sat, 27 Oct 2012 12:17:14 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110686
fixes bug: http://debbugs.gnu.org/11795
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Sat 2012-10-27 12:17:14 +0300
message:
* lisp/wdired.el (wdired-keep-marker-rename): New defcustom.
(wdired-do-renames): Use it instead of `dired-keep-marker-rename'.
* lisp/dired.el (dired-keep-marker-rename): Add reference to
`wdired-keep-marker-rename' in the docstring.
Add default character value ?R to display initially in
Customization UI instead of address@hidden
modified:
lisp/ChangeLog
lisp/dired.el
lisp/wdired.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-10-27 08:58:30 +0000
+++ b/lisp/ChangeLog 2012-10-27 09:17:14 +0000
@@ -1,3 +1,14 @@
+2012-10-27 Juri Linkov <address@hidden>
+
+ * wdired.el (wdired-keep-marker-rename): New defcustom.
+ (wdired-do-renames): Use it instead of `dired-keep-marker-rename'.
+ (Bug#11795)
+
+ * dired.el (dired-keep-marker-rename): Add reference to
+ `wdired-keep-marker-rename' in the docstring.
+ Add default character value ?R to display initially in
+ Customization UI instead of address@hidden
+
2012-10-27 Martin Rudalics <address@hidden>
* window.el (display-buffer): In doc-string describe
=== modified file 'lisp/dired.el'
--- a/lisp/dired.el 2012-10-25 13:00:52 +0000
+++ b/lisp/dired.el 2012-10-27 09:17:14 +0000
@@ -137,9 +137,12 @@
"Controls marking of renamed files.
If t, files keep their previous marks when they are renamed.
If a character, renamed files (whether previously marked or not)
-are afterward marked with that character."
+are afterward marked with that character.
+This option affects only files renamed by `dired-do-rename' and
+`dired-do-rename-regexp'. See `wdired-keep-marker-rename'
+if you want to do the same for files renamed in WDired mode."
:type '(choice (const :tag "Keep" t)
- (character :tag "Mark"))
+ (character :tag "Mark" :value ?R))
:group 'dired-mark)
(defcustom dired-keep-marker-copy ?C
=== modified file 'lisp/wdired.el'
--- a/lisp/wdired.el 2012-10-17 09:11:49 +0000
+++ b/lisp/wdired.el 2012-10-27 09:17:14 +0000
@@ -140,6 +140,20 @@
(other :tag "Bits freely editable" advanced))
:group 'wdired)
+(defcustom wdired-keep-marker-rename t
+ ;; Use t as default so that renamed files "take their markers with them".
+ "Controls marking of files renamed in WDired.
+If t, files keep their previous marks when they are renamed.
+If a character, renamed files (whether previously marked or not)
+are afterward marked with that character.
+This option affects only files renamed by `wdired-finish-edit'.
+See `dired-keep-marker-rename' if you want to do the same for files
+renamed by `dired-do-rename' and `dired-do-rename-regexp'."
+ :type '(choice (const :tag "Keep" t)
+ (character :tag "Mark" :value ?R))
+ :version "24.3"
+ :group 'wdired)
+
(defvar wdired-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-x\C-s" 'wdired-finish-edit)
@@ -416,6 +430,8 @@
(set-buffer-modified-p nil)
(setq buffer-undo-list nil))
+(declare-function dired-add-entry "dired-aux" (filename &optional marker-char
relative))
+
(defun wdired-do-renames (renames)
"Perform RENAMES in parallel."
(let ((residue ())
@@ -471,9 +487,12 @@
(dired-rename-file file-ori file-new
overwrite)
(dired-remove-file file-ori)
- (dired-add-file file-new (if (integerp
dired-keep-marker-rename)
- dired-keep-marker-rename
- old-mark)))
+ (dired-add-file
+ file-new
+ (cond ((integerp wdired-keep-marker-rename)
+ wdired-keep-marker-rename)
+ (wdired-keep-marker-rename old-mark)
+ (t nil))))
(error
(setq errors (1+ errors))
(dired-log (concat "Rename `" file-ori "' to `"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110686: * lisp/wdired.el (wdired-keep-marker-rename): New defcustom.,
Juri Linkov <=