diff options
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/dired.el | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6497182cae..98312d6485 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-01-14 Glenn Morris <[email protected]> + + * dired.el (dired-get-filename): Fix 'verbatim case of previous change. + 2012-01-13 Glenn Morris <[email protected]> * dired.el (dired-switches-escape-p): New function. diff --git a/lisp/dired.el b/lisp/dired.el index 42d2c7d7a5..f1a778ad05 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -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)) |