# HG changeset patch # User Martin Rudalics # Date 1201367872 0 # Node ID 9f02d20a167c371ba953c2dab0a8273f4edce2f8 # Parent a6bebc02888edc7c0b4f03894a45b69e6577075c (wdired-get-filename): Change `(1+ beg)' to `beg' so that the filename end is found even when the filename is empty. Fixes error and spurious newlines when marking files for deletion. diff -r a6bebc02888e -r 9f02d20a167c lisp/wdired.el --- a/lisp/wdired.el Sat Jan 26 17:00:52 2008 +0000 +++ b/lisp/wdired.el Sat Jan 26 17:17:52 2008 +0000 @@ -323,7 +323,11 @@ (unless (eq beg end) (if old (setq file (get-text-property beg 'old-name)) - (setq end (next-single-property-change (1+ beg) 'end-name)) + ;; In the following form changed `(1+ beg)' to `beg' so that + ;; the filename end is found even when the filename is empty. + ;; Fixes error and spurious newlines when marking files for + ;; deletion. + (setq end (next-single-property-change beg 'end-name)) (setq file (buffer-substring-no-properties (1+ beg) end))) (and file (setq file (wdired-normalize-filename file)))) (if (or no-dir old)