changeset 101621:5011679286cf

(ls-lisp-classify): Propertize file name before concatenating the type indicating character. (ls-lisp-format): Don't propertize file-name if ls-lisp-classify already did.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 28 Jan 2009 19:01:42 +0000
parents 97cd3a9782e0
children 0476d5672e52
files lisp/ls-lisp.el
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ls-lisp.el	Wed Jan 28 16:10:38 2009 +0000
+++ b/lisp/ls-lisp.el	Wed Jan 28 19:01:42 2009 +0000
@@ -531,13 +531,17 @@
         (type (cadr filedata)))
     (cond (type
 	   (cons
-	    (concat file-name (if (eq type t) "/" "@"))
+	    (concat (propertize file-name 'dired-filename t)
+		    (if (eq type t) "/" "@"))
 	    (cdr filedata)))
 	  ((string-match "x" (nth 9 filedata))
 	   (cons
-	    (concat file-name "*")
+	    (concat (propertize file-name 'dired-filename t) "*")
 	    (cdr filedata)))
-	  (t filedata))))
+	  (t
+	   (cons
+	    (propertize file-name 'dired-filename t)
+	    (cdr filedata))))))
 
 (defun ls-lisp-extension (filename)
   "Return extension of FILENAME (ignoring any version extension)
@@ -632,7 +636,9 @@
 	    " "
 	    (ls-lisp-format-time file-attr time-index now)
 	    " "
-	    (propertize file-name 'dired-filename t)
+	    (if (not (memq ?F switches)) ; ls-lisp-classify already did that
+		(propertize file-name 'dired-filename t)
+	      file-name)
 	    (if (stringp file-type)	; is a symbolic link
 		(concat " -> " file-type))
 	    "\n"