changeset 25558:76420959ca81

(dired-re-dir, dired-re-sym): Don't match DOS drive letters with a colon after d or l.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 06 Sep 1999 11:22:43 +0000
parents 5eb4b90c57b0
children cf5a6d4a09f1
files lisp/dired.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Mon Sep 06 11:10:35 1999 +0000
+++ b/lisp/dired.el	Mon Sep 06 11:22:43 1999 +0000
@@ -217,8 +217,10 @@
 ;; "Regexp matching a marked line.
 ;; Important: the match ends just after the marker."
 (defvar dired-re-maybe-mark "^. ")
-(defvar dired-re-dir (concat dired-re-maybe-mark dired-re-inode-size "d"))
-(defvar dired-re-sym (concat dired-re-maybe-mark dired-re-inode-size "l"))
+;; The [^:] part after "d" and "l" is to avoid confusion with the
+;; DOS/Windows-style drive letters in directory names, like in "d:/foo".
+(defvar dired-re-dir (concat dired-re-maybe-mark dired-re-inode-size "d[^:]"))
+(defvar dired-re-sym (concat dired-re-maybe-mark dired-re-inode-size "l[^:]"))
 (defvar dired-re-exe;; match ls permission string of an executable file
   (mapconcat (function
 	      (lambda (x)