]> git.eshelyaron.com Git - emacs.git/commitdiff
Wrap filename character quoting code with save-excursion so following forms
authorSimon Marshall <simon@gnu.org>
Thu, 30 Mar 1995 07:10:08 +0000 (07:10 +0000)
committerSimon Marshall <simon@gnu.org>
Thu, 30 Mar 1995 07:10:08 +0000 (07:10 +0000)
relying on point aren't broken.

lisp/dired.el

index 03637103a3453ae7e1be1ef409ab5f7fa2755d8b..7c8e65a23d997dd1f565dd5cffab5f43ec18206b 100644 (file)
@@ -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))