Commit ad632492 authored by Simon Marshall's avatar Simon Marshall
Browse files

Wrap filename character quoting code with save-excursion so following forms

relying on point aren't broken.
parent 7357a681
......@@ -552,15 +552,16 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
;; 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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment