1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

(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.
This commit is contained in:
Martin Rudalics 2008-01-26 17:23:56 +00:00
parent 9db3bfaeaf
commit e317200134
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2008-01-26 Phil Sung <psung@mit.edu> (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 Martin Rudalics <rudalics@gmx.at>
* subr.el (find-tag-default): Simplify using exclusively

View file

@ -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)