*** ls-lisp.Francis-Wright.el 2005-11-05 20:55:23.000000000 +0100 --- ls-lisp.Francis-Wright.patched.el 2005-11-07 18:06:10.374589769 +0100 *************** *** 239,253 **** (unless (featurep 'ls-lisp) ; this file is being reloaded! (fset 'original-insert-directory (symbol-function 'insert-directory))) - ;; Stub to allow ls-lisp to parse symbolic links via another library: - (unless (fboundp 'ls-lisp-parse-symlink) ; already defined! - (defun ls-lisp-parse-symlink (file-name) - "This stub may be redefined to parse FILE-NAME as a symlink. - It should return nil or the link target as a string. - Suitable symlink support is provided by w32-symlinks.el from - http://centaur.maths.qmul.ac.uk/Emacs/." - nil)) - (defvar ls-lisp-group-display nil ; internal global variable "Non-nil causes ls-lisp to display file group. If the value is a string then it is displayed, e.g. \" root\", --- 239,244 ---- *************** *** 312,318 **** alphanumerically by name. Invalid switches are silently ignored. The F and L switches require separate symlink support on non-GNU/UNIX ! platforms; see `ls-lisp-parse-symlink'." (if ls-lisp-use-insert-directory-program (original-insert-directory file switches wildcard full-directory-p) ;; We need the directory in order to find the right handler. --- 303,310 ---- alphanumerically by name. Invalid switches are silently ignored. The F and L switches require separate symlink support on non-GNU/UNIX ! platforms. Suitable symlink support for MS Windows is provided by ! w32-symlinks.el from http://centaur.maths.qmw.ac.uk/Emacs/." (if ls-lisp-use-insert-directory-program (original-insert-directory file switches wildcard full-directory-p) ;; We need the directory in order to find the right handler. *************** *** 588,597 **** FILEDATA has the form (filename . `file-attributes'). Its `cadr' is t for directory, string (name linked to) for symbolic link, or nil." (let ((file-name (cadr filedata))) ; file-type ! (if (or (stringp file-name) ; GNU/UNIX symlink? ! (and (null file-name) ; non-GNU/UNIX symlink? ! (stringp ! (setq file-name (ls-lisp-parse-symlink (car filedata)))))) (progn ;; Hide directory part, so that display matches ls but ;; dired can still find the file: --- 580,586 ---- FILEDATA has the form (filename . `file-attributes'). Its `cadr' is t for directory, string (name linked to) for symbolic link, or nil." (let ((file-name (cadr filedata))) ; file-type ! (if (stringp file-name) ; symlink? (progn ;; Hide directory part, so that display matches ls but ;; dired can still find the file: *************** *** 612,620 **** (let ((dir (car file-attributes))) ;; dir is t for directory, string (name linked to) for symbolic ;; link, or nil. ! (cond ((or dir ! ;; Parsing .lnk files here is perhaps overkill! ! (setq dir (ls-lisp-parse-symlink file-name))) (concat file-name (if (eq dir t) "/" "@"))) ((string-match "x" (nth 8 file-attributes)) (concat file-name "*")) --- 601,607 ---- (let ((dir (car file-attributes))) ;; dir is t for directory, string (name linked to) for symbolic ;; link, or nil. ! (cond (dir (concat file-name (if (eq dir t) "/" "@"))) ((string-match "x" (nth 8 file-attributes)) (concat file-name "*")) *************** *** 672,681 **** ;; t for directory, string (name linked to) ;; for symbolic link, or nil. (drwxrwxrwx (nth 8 file-attr))) ; attribute string ("drwxrwxrwx") - (and (null file-type) - ;; Maybe no kernel support for symlinks, so... - (setq file-type (ls-lisp-parse-symlink file-name)) - (aset drwxrwxrwx 0 ?l)) ; symbolic link - update attribute string (concat (if (memq ?i switches) ; inode number (format " %6d" (nth 10 file-attr))) ;; nil is treated like "" in concat --- 659,664 ----