]> code.delx.au - gnu-emacs/blobdiff - lisp/ls-lisp.el
.
[gnu-emacs] / lisp / ls-lisp.el
index 6efc77b099e8ea287220bd811e46b674b7596b3f..9f6de6753c668bc471c79bb89961c9767951cd61 100644 (file)
@@ -65,7 +65,6 @@
 
 ;;; Code:
 
-;;;###autoload
 (defgroup ls-lisp nil
   "Emulate the ls program completely in Emacs Lisp."
   :version "21.1"
@@ -159,16 +158,20 @@ current year. The OLD-TIME-FORMAT is used for older files.  To use ISO
 \(setq ls-lisp-format-time-list
        '(\"%Y-%m-%d %H:%M\"
          \"%Y-%m-%d      \"))"
-  :type  '(list string)
+  :type '(list (string :tag "Early time format")
+              (string :tag "Old time format"))
   :group 'ls-lisp)
 
+(defvar original-insert-directory nil
+  "This holds the original function definition of `insert-directory'.")
+
 ;; Remember the original insert-directory function
 (or (featurep 'ls-lisp)  ; FJW: unless this file is being reloaded!
-    (fset 'original-insert-directory (symbol-function 'insert-directory)))
+    (setq original-insert-directory (symbol-function 'insert-directory)))
 
 ;; This stub is to allow ls-lisp to parse symbolic links via another
 ;; library such as w32-symlinks.el from
-;; http://centaur.qmw.ac.uk/Emacs/:
+;; http://centaur.maths.qmw.ac.uk/Emacs/:
 (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."
@@ -200,7 +203,8 @@ is non-nil; otherwise, it interprets wildcards as regular expressions
 to match file names.  It does not support all `ls' switches -- those
 that work are: A a c i r S s t u U X g G B C R and F partly."
   (if ls-lisp-use-insert-directory-program
-      (original-insert-directory file switches wildcard full-directory-p)
+      (funcall original-insert-directory
+              file switches wildcard full-directory-p)
     ;; We need the directory in order to find the right handler.
     (let ((handler (find-file-name-handler (expand-file-name file)
                                           'insert-directory)))