diff options
| -rw-r--r-- | lisp/ls-lisp.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index caddc7f760b..cf3bff5c482 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el | |||
| @@ -713,23 +713,26 @@ SWITCHES is a list of characters. Default sorting is alphabetic." | |||
| 713 | (defun ls-lisp-classify-file (filename fattr) | 713 | (defun ls-lisp-classify-file (filename fattr) |
| 714 | "Append a character to FILENAME indicating the file type. | 714 | "Append a character to FILENAME indicating the file type. |
| 715 | 715 | ||
| 716 | This function puts the `dired-filename' property on FILENAME, but | ||
| 717 | not on the character indicator it appends. | ||
| 716 | FATTR is the file attributes returned by `file-attributes' for the file. | 718 | FATTR is the file attributes returned by `file-attributes' for the file. |
| 717 | The file type indicators are `/' for directories, `@' for symbolic | 719 | The file type indicators are `/' for directories, `@' for symbolic |
| 718 | links, `|' for FIFOs, `=' for sockets, `*' for regular files that | 720 | links, `|' for FIFOs, `=' for sockets, `*' for regular files that |
| 719 | are executable, and nothing for other types of files." | 721 | are executable, and nothing for other types of files." |
| 720 | (let* ((type (car fattr)) | 722 | (let* ((type (car fattr)) |
| 721 | (modestr (nth 8 fattr)) | 723 | (modestr (nth 8 fattr)) |
| 722 | (typestr (substring modestr 0 1))) | 724 | (typestr (substring modestr 0 1)) |
| 725 | (file-name (propertize filename 'dired-filename t))) | ||
| 723 | (cond | 726 | (cond |
| 724 | (type | 727 | (type |
| 725 | (concat filename (if (eq type t) "/" "@"))) | 728 | (concat file-name (if (eq type t) "/" "@"))) |
| 726 | ((string-match "x" modestr) | 729 | ((string-match "x" modestr) |
| 727 | (concat filename "*")) | 730 | (concat file-name "*")) |
| 728 | ((string= "p" typestr) | 731 | ((string= "p" typestr) |
| 729 | (concat filename "|")) | 732 | (concat file-name "|")) |
| 730 | ((string= "s" typestr) | 733 | ((string= "s" typestr) |
| 731 | (concat filename "=")) | 734 | (concat file-name "=")) |
| 732 | (t filename)))) | 735 | (t file-name)))) |
| 733 | 736 | ||
| 734 | (defun ls-lisp-classify (filedata) | 737 | (defun ls-lisp-classify (filedata) |
| 735 | "Append a character to file name in FILEDATA indicating the file type. | 738 | "Append a character to file name in FILEDATA indicating the file type. |
| @@ -742,7 +745,6 @@ links, `|' for FIFOs, `=' for sockets, `*' for regular files that | |||
| 742 | are executable, and nothing for other types of files." | 745 | are executable, and nothing for other types of files." |
| 743 | (let ((file-name (car filedata)) | 746 | (let ((file-name (car filedata)) |
| 744 | (fattr (cdr filedata))) | 747 | (fattr (cdr filedata))) |
| 745 | (setq file-name (propertize file-name 'dired-filename t)) | ||
| 746 | (cons (ls-lisp-classify-file file-name fattr) fattr))) | 748 | (cons (ls-lisp-classify-file file-name fattr) fattr))) |
| 747 | 749 | ||
| 748 | (defun ls-lisp-extension (filename) | 750 | (defun ls-lisp-extension (filename) |