emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r99545: * files.el (directory-listing


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99545: * files.el (directory-listing-before-filename-regexp): Use
Date: Sun, 21 Feb 2010 16:12:46 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99545
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2010-02-21 16:12:46 -0500
message:
  * files.el (directory-listing-before-filename-regexp): Use
  stricter matching for iso-style dates, to avoid false matches with
  date-like filenames (Bug#5597).
modified:
  lisp/ChangeLog
  lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-02-21 21:05:13 +0000
+++ b/lisp/ChangeLog    2010-02-21 21:12:46 +0000
@@ -1,5 +1,9 @@
 2010-02-21  Chong Yidong  <address@hidden>
 
+       * files.el (directory-listing-before-filename-regexp): Use
+       stricter matching for iso-style dates, to avoid false matches with
+       date-like filenames (Bug#5597).
+
        * htmlfontify.el (htmlfontify): Doc fix.
 
        * eshell/eshell.el (eshell): Doc fix.

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2010-02-14 09:23:52 +0000
+++ b/lisp/files.el     2010-02-21 21:12:46 +0000
@@ -5592,8 +5592,10 @@
         ;; -r--r--r--   1 may      1997        1168 Oct 19 16:49 README
 
         ;; The "[BkKMGTPEZY]?" below supports "ls -alh" output.
-        ;; The ".*" below finds the last match if there are multiple matches.
-        ;; This avoids recognizing `jservice  10  1024' as a date in the line:
+
+        ;; For non-iso date formats, we add the ".*" in order to find
+        ;; the last possible match.  This avoids recognizing
+        ;; `jservice 10 1024' as a date in the line:
         ;; drwxr-xr-x  3 jservice  10  1024 Jul  2  1997 esg-host
 
          ;; vc dired listings provide the state or blanks between file
@@ -5601,9 +5603,10 @@
          ;; parantheses:
          ;; -rw-r--r-- (modified) 2005-10-22 21:25 files.el
          ;; This is not supported yet.
-    (purecopy (concat ".*[0-9][BkKMGTPEZY]?" s
-           "\\(" western "\\|" western-comma "\\|" east-asian "\\|" iso "\\)"
-           s "+")))
+    (purecopy (concat "\\([0-9][BkKMGTPEZY]? " iso
+                     "\\|.*[0-9][BkKMGTPEZY]? "
+                     "\\(" western "\\|" western-comma "\\|" east-asian "\\)"
+                     "\\) +")))
   "Regular expression to match up to the file name in a directory listing.
 The default value is designed to recognize dates and times
 regardless of the language.")


reply via email to

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