# HG changeset patch # User Richard M. Stallman # Date 1040502047 0 # Node ID 9b8d6678be5c893f2772ee619d6254003eaa1800 # Parent af752f3c5c09eb575829be4e3d1fa051948e0de7 (original-insert-directory): Make this a variable, don't set its function definition. (insert-directory): Use funcall to call that function. diff -r af752f3c5c09 -r 9b8d6678be5c lisp/ls-lisp.el --- a/lisp/ls-lisp.el Sat Dec 21 20:19:37 2002 +0000 +++ b/lisp/ls-lisp.el Sat Dec 21 20:20:47 2002 +0000 @@ -162,9 +162,12 @@ (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 @@ -200,7 +203,8 @@ 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)))