comparison lisp/ls-lisp.el @ 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 a9dc0e7c3f2b
children cf4d6724a83b
comparison
equal deleted inserted replaced
101620:97cd3a9782e0 101621:5011679286cf
529 for directory, string (name linked to) for symbolic link, or nil." 529 for directory, string (name linked to) for symbolic link, or nil."
530 (let ((file-name (car filedata)) 530 (let ((file-name (car filedata))
531 (type (cadr filedata))) 531 (type (cadr filedata)))
532 (cond (type 532 (cond (type
533 (cons 533 (cons
534 (concat file-name (if (eq type t) "/" "@")) 534 (concat (propertize file-name 'dired-filename t)
535 (if (eq type t) "/" "@"))
535 (cdr filedata))) 536 (cdr filedata)))
536 ((string-match "x" (nth 9 filedata)) 537 ((string-match "x" (nth 9 filedata))
537 (cons 538 (cons
538 (concat file-name "*") 539 (concat (propertize file-name 'dired-filename t) "*")
539 (cdr filedata))) 540 (cdr filedata)))
540 (t filedata)))) 541 (t
542 (cons
543 (propertize file-name 'dired-filename t)
544 (cdr filedata))))))
541 545
542 (defun ls-lisp-extension (filename) 546 (defun ls-lisp-extension (filename)
543 "Return extension of FILENAME (ignoring any version extension) 547 "Return extension of FILENAME (ignoring any version extension)
544 FOLLOWED by null and full filename, SOLELY for full alpha sort." 548 FOLLOWED by null and full filename, SOLELY for full alpha sort."
545 ;; Force extension sort order: `no ext' then `null ext' then `ext' 549 ;; Force extension sort order: `no ext' then `null ext' then `ext'
630 gid)))) 634 gid))))
631 (ls-lisp-format-file-size file-size (memq ?h switches)) 635 (ls-lisp-format-file-size file-size (memq ?h switches))
632 " " 636 " "
633 (ls-lisp-format-time file-attr time-index now) 637 (ls-lisp-format-time file-attr time-index now)
634 " " 638 " "
635 (propertize file-name 'dired-filename t) 639 (if (not (memq ?F switches)) ; ls-lisp-classify already did that
640 (propertize file-name 'dired-filename t)
641 file-name)
636 (if (stringp file-type) ; is a symbolic link 642 (if (stringp file-type) ; is a symbolic link
637 (concat " -> " file-type)) 643 (concat " -> " file-type))
638 "\n" 644 "\n"
639 ))) 645 )))
640 646