From 3cdb7f5a3854515902553934d2a9886781c5e56f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 13 Jan 2012 21:07:49 -0500 Subject: [PATCH] * lisp/dired.el (dired-get-filename): Fix 'verbatim case of previous change. --- lisp/ChangeLog | 4 ++++ lisp/dired.el | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6497182cae6..98312d64853 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-01-14 Glenn Morris + + * dired.el (dired-get-filename): Fix 'verbatim case of previous change. + 2012-01-13 Glenn Morris * dired.el (dired-switches-escape-p): New function. diff --git a/lisp/dired.el b/lisp/dired.el index 42d2c7d7a5a..f1a778ad05a 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)) -- 2.11.4.GIT