emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/dired.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/dired.el,v
Date: Fri, 05 Sep 2008 21:16:21 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/09/05 21:16:20

Index: dired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired.el,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -b -r1.409 -r1.410
--- dired.el    23 Aug 2008 08:01:36 -0000      1.409
+++ dired.el    5 Sep 2008 21:16:19 -0000       1.410
@@ -1915,17 +1915,11 @@
          ;; Get rid of the mouse-face property that file names have.
          (set-text-properties 0 (length file) nil file)
          ;; Unquote names quoted by ls or by dired-insert-directory.
-         ;; Using read to unquote is much faster than substituting
-         ;; \007 (4 chars) -> ^G  (1 char) etc. in a lisp loop.
-         (setq file
-               (read
-                (concat "\""
-                        ;; Some ls -b don't escape quotes, argh!
-                        ;; This is not needed for GNU ls, though.
-                        (or (dired-string-replace-match
-                             "\\([^\\]\\|\\`\\)\"" file "\\1\\\\\"" nil t)
-                            file)
-                        "\"")))
+         (while (string-match
+                 "\\(?:[^\\]\\|\\`\\)\\(\\\\[0-7][0-7][0-7]\\)" file)
+           (setq file (replace-match
+                       (read (concat "\"" (match-string 1 file)  "\""))
+                       nil t file 1)))
          ;; The above `read' will return a unibyte string if FILE
          ;; contains eight-bit-control/graphic characters.
          (if (and enable-multibyte-characters




reply via email to

[Prev in Thread] Current Thread [Next in Thread]