]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/dired.el (dired-get-filename): Fix 'verbatim case of previous change.
authorGlenn Morris <rgm@gnu.org>
Sat, 14 Jan 2012 02:07:49 +0000 (21:07 -0500)
committerGlenn Morris <rgm@gnu.org>
Sat, 14 Jan 2012 02:07:49 +0000 (21:07 -0500)
lisp/ChangeLog
lisp/dired.el

index 6497182cae6dc942a660c6c0d8731373d3c381df..98312d64853450278b8a31d281c194fa99b39b62 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-14  Glenn Morris  <rgm@gnu.org>
+
+       * dired.el (dired-get-filename): Fix 'verbatim case of previous change.
+
 2012-01-13  Glenn Morris  <rgm@gnu.org>
 
        * dired.el (dired-switches-escape-p): New function.
index 42d2c7d7a5a2d06f80a3223cb23c2151a2acdb8e..f1a778ad05a4a312106792858d7c83b83486049a 100644 (file)
@@ -2107,10 +2107,15 @@ Otherwise, an error occurs in these cases."
           ;; Unescape any spaces escaped by ls -b (bug#10469).
           ;; Other -b quotes, eg \t, \n, work transparently.
           (if (dired-switches-escape-p dired-actual-switches)
-              (let ((start 0))
+              (let ((start 0)
+                    (rep "")
+                    (shift -1))
+                (if (eq localp 'verbatim)
+                    (setq rep "\\\\"
+                          shift +1))
                 (while (string-match "\\(\\\\\\) " file start)
-                  (setq file (replace-match "" nil t file 1)
-                        start (1- (match-end 0))))))
+                  (setq file (replace-match rep nil t file 1)
+                        start (+ shift (match-end 0))))))
          (when (eq system-type 'windows-nt)
            (save-match-data
              (let ((start 0))