# HG changeset patch # User Sebastian Kremer # Date 665600810 0 # Node ID 7811acc9c926517f72cf6f6e6510ec35a9eb783a # Parent c3060611e9afaecde16cc4a391856f6227a2f901 Removed dired-ls-function. IT STILL CRASHES EMACS SOMETIMES! diff -r c3060611e9af -r 7811acc9c926 lisp/ls-lisp.el --- a/lisp/ls-lisp.el Sat Feb 02 13:30:43 1991 +0000 +++ b/lisp/ls-lisp.el Sun Feb 03 17:06:50 1991 +0000 @@ -1,4 +1,4 @@ -;;;; dired-lisp.el - emulate ls completely in Emacs Lisp. $Revision$ +;;;; dired-lisp.el - emulate ls completely in Emacs Lisp. $Revision: 1.2 $ ;;;; Copyright (C) 1991 Sebastian Kremer ;;;; READ THE WARNING BELOW BEFORE USING THIS PROGRAM! @@ -24,41 +24,29 @@ ;;;; WARNING: -;;;; I initially used file-name-all-completions instead of -;;;; directory-files and got an internal Emacs error: +;;;; Sometimes I get an internal Emacs error: ;;;; Signalling: (wrong-type-argument natnump #) -;;;; It has never happened again and had no bad aftereffects, but do be -;;;; careful! +;;;; Sometimes emacs just crashes with a fatal error. ;;; RESTRICTIONS: ;;;; Always sorts by name (ls switches are completely ignored for now) ;;;; Cannot display date of file, displays a fake date "Jan 00 00:00" instead ;;;; Only numeric uid/gid +;;;; Loading ange-ftp breaks it ;;;; It is surprisingly fast, though! ;;;; TODO: ;;;; Recognize at least some ls switches: l R g F i -(require 'dired) - -(or (fboundp 'tree-dired-ls) ; save original function definition - (fset 'tree-dired-ls (symbol-function 'dired-ls))) - -;; perhaps buffer-local (he he) -(defvar dired-ls-function 'dired-lisp-ls - "*Function dired uses to obtain ls output. -Possible values 'tree-dired-ls and 'dired-lisp-ls. -Arglist is (FILE &optional SWITCHES WILDCARD FULL-DIRECTORY-P).") +(require 'dired) ; we will redefine this function: (defun dired-ls (file &optional switches wildcard full-directory-p) - (funcall dired-ls-function file switches wildcard full-directory-p)) - -(defun dired-lisp-ls (file &optional switches wildcard full-directory-p) + "dired-lisp.el's version of dired-ls." ; "Insert ls output of FILE, optionally formatted with SWITCHES. ;Optional third arg WILDCARD means treat FILE as shell wildcard. ;Optional fourth arg FULL-DIRECTORY-P means file is a directory and