From add20191343608c74f9b389b7dcffe0c22ca7580 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 26 Jan 2008 17:18:50 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 6 ++++++ lisp/wdired.el | 6 +++++- 2 files changed, 11 insertions(+), 1 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) -- 2.39.2