Mercurial > emacs
changeset 11151:ab55a16a92ce
Wrap filename character quoting code with save-excursion so following forms
relying on point aren't broken.
author | Simon Marshall <simon@gnu.org> |
---|---|
date | Thu, 30 Mar 1995 07:10:08 +0000 |
parents | 030b401afd0e |
children | eb26f12a8be6 |
files | lisp/dired.el |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Wed Mar 29 21:46:19 1995 +0000 +++ b/lisp/dired.el Thu Mar 30 07:10:08 1995 +0000 @@ -552,15 +552,16 @@ ;; in dired-noselect. (insert-directory (expand-file-name dir-or-list) switches wildcard full-p)) ;; Quote certain characters, unless ls quoted them for us. - (cond ((not (string-match "b" dired-actual-switches)) - (setq end (point-marker)) - (goto-char opoint) - (while (search-forward "\\" end t) - (replace-match "\\\\" nil t)) - (goto-char opoint) - (while (search-forward "\^m" end t) - (replace-match "\\015" nil t)) - (set-marker end nil))) + (if (not (string-match "b" dired-actual-switches)) + (save-excursion + (setq end (point-marker)) + (goto-char opoint) + (while (search-forward "\\" end t) + (replace-match "\\\\" nil t)) + (goto-char opoint) + (while (search-forward "\^m" end t) + (replace-match "\\015" nil t)) + (set-marker end nil))) (dired-insert-set-properties opoint (point))) (setq dired-directory dir-or-list))