+2012-10-27 Juri Linkov <juri@jurta.org>
+
+ * 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 ?@.
+
2012-10-27 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer): In doc-string describe
"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
(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)
(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 ())
(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 `"