diff options
| author | Martin Rudalics | 2008-01-26 17:18:50 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2008-01-26 17:18:50 +0000 |
| commit | add20191343608c74f9b389b7dcffe0c22ca7580 (patch) | |
| tree | b23a844f6de77a169832b216d070c35c73724f4b | |
| parent | 4ada4a87b460fad6237978b6f8dbb067e1a9908a (diff) | |
| download | emacs-add20191343608c74f9b389b7dcffe0c22ca7580.tar.gz emacs-add20191343608c74f9b389b7dcffe0c22ca7580.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/wdired.el | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4dd992d03b..cbdb8f93256 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-01-26 Phil Sung <psung@mit.edu> (tiny change) | ||
| 2 | |||
| 3 | * wdired.el (wdired-get-filename): Change `(1+ beg)' to `beg' so | ||
| 4 | that the filename end is found even when the filename is empty. | ||
| 5 | Fixes error and spurious newlines when marking files for deletion. | ||
| 6 | |||
| 1 | 2008-01-26 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | 2008-01-26 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 8 | ||
| 3 | * blank-mode.el: New version 9.1. Handle "long" line tail | 9 | * 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." | |||
| 323 | (unless (eq beg end) | 323 | (unless (eq beg end) |
| 324 | (if old | 324 | (if old |
| 325 | (setq file (get-text-property beg 'old-name)) | 325 | (setq file (get-text-property beg 'old-name)) |
| 326 | (setq end (next-single-property-change (1+ beg) 'end-name)) | 326 | ;; In the following form changed `(1+ beg)' to `beg' so that |
| 327 | ;; the filename end is found even when the filename is empty. | ||
| 328 | ;; Fixes error and spurious newlines when marking files for | ||
| 329 | ;; deletion. | ||
| 330 | (setq end (next-single-property-change beg 'end-name)) | ||
| 327 | (setq file (buffer-substring-no-properties (1+ beg) end))) | 331 | (setq file (buffer-substring-no-properties (1+ beg) end))) |
| 328 | (and file (setq file (wdired-normalize-filename file)))) | 332 | (and file (setq file (wdired-normalize-filename file)))) |
| 329 | (if (or no-dir old) | 333 | (if (or no-dir old) |