From: Martin Rudalics Date: Sat, 26 Jan 2008 17:18:50 +0000 (+0000) Subject: (wdired-get-filename): Change `(1+ beg)' to `beg' so X-Git-Tag: emacs-pretest-22.1.90~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=add20191343608c74f9b389b7dcffe0c22ca7580;p=emacs.git (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 --git a/lisp/ChangeLog b/lisp/ChangeLog index b4dd992d03b..cbdb8f93256 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-01-26 Phil Sung (tiny change) + + * wdired.el (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. + 2008-01-26 Vinicius Jose Latorre * blank-mode.el: New version 9.1. Handle "long" line tail diff --git a/lisp/wdired.el b/lisp/wdired.el index dff4c008d1b..013e14ec7f7 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -323,7 +323,11 @@ non-nil means return old filename." (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)