Mercurial > emacs
annotate lisp/eshell/em-ls.el @ 95203:675ce1a056ee
(fs_query_fontset): Use xstricmp.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Thu, 22 May 2008 13:36:13 +0000 |
parents | ad5d26b1d5d1 |
children | 45dbb3c749a6 |
rev | line source |
---|---|
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
37661
diff
changeset
|
1 ;;; em-ls.el --- implementation of ls in Lisp |
29876 | 2 |
95152
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
4 ;; 2008 Free Software Foundation, Inc. |
29876 | 5 |
32526 | 6 ;; Author: John Wiegley <johnw@gnu.org> |
7 | |
29876 | 8 ;; This file is part of GNU Emacs. |
9 | |
94661
b5b0801a7637
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
29876 | 11 ;; it under the terms of the GNU General Public License as published by |
94661
b5b0801a7637
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
b5b0801a7637
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
13 ;; (at your option) any later version. |
29876 | 14 |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
94661
b5b0801a7637
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
29876 | 22 |
87069
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
23 ;;; Commentary: |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
24 |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
25 ;; Most of the command switches recognized by GNU's ls utility are |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
26 ;; supported ([(fileutils)ls invocation]). |
29876 | 27 |
87069
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
28 ;;; Code: |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
29 |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
30 (eval-when-compile (require 'eshell)) |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
31 (require 'esh-util) |
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
32 (require 'esh-opt) |
29876 | 33 |
95152
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
34 ;;;###autoload |
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
35 (eshell-defgroup eshell-ls nil |
29876 | 36 "This module implements the \"ls\" utility fully in Lisp. If it is |
37 passed any unrecognized command switches, it will revert to the | |
38 operating system's version. This version of \"ls\" uses text | |
39 properties to colorize its output based on the setting of | |
40 `eshell-ls-use-colors'." | |
41 :tag "Implementation of `ls' in Lisp" | |
42 :group 'eshell-module) | |
43 | |
44 ;;; User Variables: | |
45 | |
46 (defvar eshell-ls-orig-insert-directory | |
47 (symbol-function 'insert-directory) | |
48 "Preserve the original definition of `insert-directory'.") | |
49 | |
50 (defcustom eshell-ls-unload-hook | |
51 (list | |
52 (function | |
53 (lambda () | |
54 (fset 'insert-directory eshell-ls-orig-insert-directory)))) | |
55 "*When unloading `eshell-ls', restore the definition of `insert-directory'." | |
56 :type 'hook | |
57 :group 'eshell-ls) | |
58 | |
33020 | 59 (defcustom eshell-ls-initial-args nil |
60 "*If non-nil, this list of args is included before any call to `ls'. | |
61 This is useful for enabling human-readable format (-h), for example." | |
62 :type '(repeat :tag "Arguments" string) | |
63 :group 'eshell-ls) | |
64 | |
39984
5e4848f89017
(eshell-ls-dired-initial-args): Added an extra customization variable,
John Wiegley <johnw@newartisans.com>
parents:
38414
diff
changeset
|
65 (defcustom eshell-ls-dired-initial-args nil |
64560
8e6e95602853
(eshell-ls-decorated-name): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
64085
diff
changeset
|
66 "*If non-nil, args is included before any call to `ls' in Dired. |
39984
5e4848f89017
(eshell-ls-dired-initial-args): Added an extra customization variable,
John Wiegley <johnw@newartisans.com>
parents:
38414
diff
changeset
|
67 This is useful for enabling human-readable format (-h), for example." |
5e4848f89017
(eshell-ls-dired-initial-args): Added an extra customization variable,
John Wiegley <johnw@newartisans.com>
parents:
38414
diff
changeset
|
68 :type '(repeat :tag "Arguments" string) |
5e4848f89017
(eshell-ls-dired-initial-args): Added an extra customization variable,
John Wiegley <johnw@newartisans.com>
parents:
38414
diff
changeset
|
69 :group 'eshell-ls) |
5e4848f89017
(eshell-ls-dired-initial-args): Added an extra customization variable,
John Wiegley <johnw@newartisans.com>
parents:
38414
diff
changeset
|
70 |
29876 | 71 (defcustom eshell-ls-use-in-dired nil |
64560
8e6e95602853
(eshell-ls-decorated-name): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
64085
diff
changeset
|
72 "*If non-nil, use `eshell-ls' to read directories in Dired." |
29876 | 73 :set (lambda (symbol value) |
74 (if value | |
75 (unless (and (boundp 'eshell-ls-use-in-dired) | |
76 eshell-ls-use-in-dired) | |
77 (fset 'insert-directory 'eshell-ls-insert-directory)) | |
78 (when (and (boundp 'eshell-ls-insert-directory) | |
79 eshell-ls-use-in-dired) | |
80 (fset 'insert-directory eshell-ls-orig-insert-directory))) | |
81 (setq eshell-ls-use-in-dired value)) | |
82 :type 'boolean | |
83 :require 'em-ls | |
84 :group 'eshell-ls) | |
85 | |
86 (defcustom eshell-ls-default-blocksize 1024 | |
87 "*The default blocksize to use when display file sizes with -s." | |
88 :type 'integer | |
89 :group 'eshell-ls) | |
90 | |
33020 | 91 (defcustom eshell-ls-exclude-regexp nil |
29876 | 92 "*Unless -a is specified, files matching this regexp will not be shown." |
35718
96d933eb13f4
(eshell-ls-exclude-regexp): Fix :type.
Dave Love <fx@gnu.org>
parents:
33020
diff
changeset
|
93 :type '(choice regexp (const nil)) |
29876 | 94 :group 'eshell-ls) |
95 | |
33020 | 96 (defcustom eshell-ls-exclude-hidden t |
97 "*Unless -a is specified, files beginning with . will not be shown. | |
98 Using this boolean, instead of `eshell-ls-exclude-regexp', is both | |
99 faster and conserves more memory." | |
100 :type 'boolean | |
101 :group 'eshell-ls) | |
102 | |
29876 | 103 (defcustom eshell-ls-use-colors t |
104 "*If non-nil, use colors in file listings." | |
105 :type 'boolean | |
106 :group 'eshell-ls) | |
107 | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
108 (defface eshell-ls-directory |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
109 '((((class color) (background light)) (:foreground "Blue" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
110 (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
111 (t (:weight bold))) |
29876 | 112 "*The face used for highlight directories." |
113 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
114 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
115 (put 'eshell-ls-directory-face 'face-alias 'eshell-ls-directory) |
29876 | 116 |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
117 (defface eshell-ls-symlink |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
118 '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
119 (((class color) (background dark)) (:foreground "Cyan" :weight bold))) |
29876 | 120 "*The face used for highlight symbolic links." |
121 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
122 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
123 (put 'eshell-ls-symlink-face 'face-alias 'eshell-ls-symlink) |
29876 | 124 |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
125 (defface eshell-ls-executable |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
126 '((((class color) (background light)) (:foreground "ForestGreen" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
127 (((class color) (background dark)) (:foreground "Green" :weight bold))) |
29876 | 128 "*The face used for highlighting executables (not directories, though)." |
129 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
130 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
131 (put 'eshell-ls-executable-face 'face-alias 'eshell-ls-executable) |
29876 | 132 |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
133 (defface eshell-ls-readonly |
29876 | 134 '((((class color) (background light)) (:foreground "Brown")) |
135 (((class color) (background dark)) (:foreground "Pink"))) | |
136 "*The face used for highlighting read-only files." | |
137 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
138 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
139 (put 'eshell-ls-readonly-face 'face-alias 'eshell-ls-readonly) |
29876 | 140 |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
141 (defface eshell-ls-unreadable |
29876 | 142 '((((class color) (background light)) (:foreground "Grey30")) |
143 (((class color) (background dark)) (:foreground "DarkGrey"))) | |
144 "*The face used for highlighting unreadable files." | |
145 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
146 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
147 (put 'eshell-ls-unreadable-face 'face-alias 'eshell-ls-unreadable) |
29876 | 148 |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
149 (defface eshell-ls-special |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
150 '((((class color) (background light)) (:foreground "Magenta" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
151 (((class color) (background dark)) (:foreground "Magenta" :weight bold))) |
29876 | 152 "*The face used for highlighting non-regular files." |
153 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
154 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
155 (put 'eshell-ls-special-face 'face-alias 'eshell-ls-special) |
29876 | 156 |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
157 (defface eshell-ls-missing |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
158 '((((class color) (background light)) (:foreground "Red" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
159 (((class color) (background dark)) (:foreground "Red" :weight bold))) |
64560
8e6e95602853
(eshell-ls-decorated-name): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
64085
diff
changeset
|
160 "*The face used for highlighting non-existent file names." |
29876 | 161 :group 'eshell-ls) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
162 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
163 (put 'eshell-ls-missing-face 'face-alias 'eshell-ls-missing) |
29876 | 164 |
165 (defcustom eshell-ls-archive-regexp | |
166 (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" | |
167 "zip\\|[zZ]\\|gz\\|bz2\\|deb\\|rpm\\)\\'") | |
168 "*A regular expression that matches names of file archives. | |
169 This typically includes both traditional archives and compressed | |
170 files." | |
171 :type 'regexp | |
172 :group 'eshell-ls) | |
173 | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
174 (defface eshell-ls-archive |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
175 '((((class color) (background light)) (:foreground "Orchid" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
176 (((class color) (background dark)) (:foreground "Orchid" :weight bold))) |
29876 | 177 "*The face used for highlighting archived and compressed file names." |
178 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
179 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
180 (put 'eshell-ls-archive-face 'face-alias 'eshell-ls-archive) |
29876 | 181 |
182 (defcustom eshell-ls-backup-regexp | |
183 "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)" | |
184 "*A regular expression that matches names of backup files." | |
185 :type 'regexp | |
186 :group 'eshell-ls) | |
187 | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
188 (defface eshell-ls-backup |
29876 | 189 '((((class color) (background light)) (:foreground "OrangeRed")) |
190 (((class color) (background dark)) (:foreground "LightSalmon"))) | |
191 "*The face used for highlighting backup file names." | |
192 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
193 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
194 (put 'eshell-ls-backup-face 'face-alias 'eshell-ls-backup) |
29876 | 195 |
196 (defcustom eshell-ls-product-regexp | |
48704
18ebc473a07d
(eshell-ls-product-regexp): Fix typo.
Andreas Schwab <schwab@suse.de>
parents:
46853
diff
changeset
|
197 "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'" |
29876 | 198 "*A regular expression that matches names of product files. |
199 Products are files that get generated from a source file, and hence | |
200 ought to be recreatable if they are deleted." | |
201 :type 'regexp | |
202 :group 'eshell-ls) | |
203 | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
204 (defface eshell-ls-product |
29876 | 205 '((((class color) (background light)) (:foreground "OrangeRed")) |
206 (((class color) (background dark)) (:foreground "LightSalmon"))) | |
207 "*The face used for highlighting files that are build products." | |
208 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
209 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
210 (put 'eshell-ls-product-face 'face-alias 'eshell-ls-product) |
29876 | 211 |
212 (defcustom eshell-ls-clutter-regexp | |
213 "\\(^texput\\.log\\|^core\\)\\'" | |
214 "*A regular expression that matches names of junk files. | |
215 These are mainly files that get created for various reasons, but don't | |
216 really need to stick around for very long." | |
217 :type 'regexp | |
218 :group 'eshell-ls) | |
219 | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
220 (defface eshell-ls-clutter |
42456
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
221 '((((class color) (background light)) (:foreground "OrangeRed" :weight bold)) |
8a4077ab418c
(various face definitions): Use :weight, not :bold.
Richard M. Stallman <rms@gnu.org>
parents:
39984
diff
changeset
|
222 (((class color) (background dark)) (:foreground "OrangeRed" :weight bold))) |
29876 | 223 "*The face used for highlighting junk file names." |
224 :group 'eshell-ls) | |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
225 ;; backward-compatibility alias |
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
226 (put 'eshell-ls-clutter-face 'face-alias 'eshell-ls-clutter) |
29876 | 227 |
228 (defsubst eshell-ls-filetype-p (attrs type) | |
229 "Test whether ATTRS specifies a directory." | |
230 (if (nth 8 attrs) | |
231 (eq (aref (nth 8 attrs) 0) type))) | |
232 | |
233 (defmacro eshell-ls-applicable (attrs index func file) | |
234 "Test whether, for ATTRS, the user UID can do what corresponds to INDEX. | |
235 This is really just for efficiency, to avoid having to stat the file | |
236 yet again." | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
237 `(if (numberp (nth 2 ,attrs)) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
238 (if (= (user-uid) (nth 2 ,attrs)) |
33020 | 239 (not (eq (aref (nth 8 ,attrs) ,index) ?-)) |
240 (,(eval func) ,file)) | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
241 (not (eq (aref (nth 8 ,attrs) |
33020 | 242 (+ ,index (if (member (nth 2 ,attrs) |
243 (eshell-current-ange-uids)) | |
244 0 6))) | |
245 ?-)))) | |
29876 | 246 |
247 (defcustom eshell-ls-highlight-alist nil | |
248 "*This alist correlates test functions to color. | |
249 The format of the members of this alist is | |
250 | |
251 (TEST-SEXP . FACE) | |
252 | |
253 If TEST-SEXP evals to non-nil, that face will be used to highlight the | |
254 name of the file. The first match wins. `file' and `attrs' are in | |
255 scope during the evaluation of TEST-SEXP." | |
256 :type '(repeat (cons function face)) | |
257 :group 'eshell-ls) | |
258 | |
259 ;;; Functions: | |
260 | |
261 (defun eshell-ls-insert-directory | |
262 (file switches &optional wildcard full-directory-p) | |
263 "Insert directory listing for FILE, formatted according to SWITCHES. | |
264 Leaves point after the inserted text. | |
265 SWITCHES may be a string of options, or a list of strings. | |
266 Optional third arg WILDCARD means treat FILE as shell wildcard. | |
267 Optional fourth arg FULL-DIRECTORY-P means file is a directory and | |
268 switches do not contain `d', so that a full listing is expected. | |
269 | |
270 This version of the function uses `eshell/ls'. If any of the switches | |
271 passed are not recognized, the operating system's version will be used | |
272 instead." | |
273 (let ((handler (find-file-name-handler file 'insert-directory))) | |
274 (if handler | |
275 (funcall handler 'insert-directory file switches | |
276 wildcard full-directory-p) | |
277 (if (stringp switches) | |
278 (setq switches (split-string switches))) | |
279 (let (eshell-current-handles | |
66589
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
280 eshell-current-subjob-p |
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
281 font-lock-mode) |
29876 | 282 ;; use the fancy highlighting in `eshell-ls' rather than font-lock |
283 (when (and eshell-ls-use-colors | |
284 (featurep 'font-lock)) | |
285 (font-lock-mode -1) | |
37326
19d97e9f6689
(eshell-ls-insert-directory): Set font-lock-defaults to nil, to
John Wiegley <johnw@newartisans.com>
parents:
35718
diff
changeset
|
286 (setq font-lock-defaults nil) |
29876 | 287 (if (boundp 'font-lock-buffers) |
288 (set 'font-lock-buffers | |
289 (delq (current-buffer) | |
290 (symbol-value 'font-lock-buffers))))) | |
291 (let ((insert-func 'insert) | |
292 (error-func 'insert) | |
33020 | 293 (flush-func 'ignore) |
39984
5e4848f89017
(eshell-ls-dired-initial-args): Added an extra customization variable,
John Wiegley <johnw@newartisans.com>
parents:
38414
diff
changeset
|
294 eshell-ls-dired-initial-args) |
29876 | 295 (eshell-do-ls (append switches (list file)))))))) |
296 | |
297 (defsubst eshell/ls (&rest args) | |
298 "An alias version of `eshell-do-ls'." | |
299 (let ((insert-func 'eshell-buffered-print) | |
300 (error-func 'eshell-error) | |
301 (flush-func 'eshell-flush)) | |
302 (eshell-do-ls args))) | |
303 | |
37661
6d7c89c79996
Set the property `eshell-no-numeric-conversions' on the following
John Wiegley <johnw@newartisans.com>
parents:
37326
diff
changeset
|
304 (put 'eshell/ls 'eshell-no-numeric-conversions t) |
6d7c89c79996
Set the property `eshell-no-numeric-conversions' on the following
John Wiegley <johnw@newartisans.com>
parents:
37326
diff
changeset
|
305 |
29876 | 306 (eval-when-compile |
307 (defvar block-size) | |
308 (defvar dereference-links) | |
309 (defvar dir-literal) | |
310 (defvar error-func) | |
311 (defvar flush-func) | |
312 (defvar human-readable) | |
313 (defvar ignore-pattern) | |
314 (defvar insert-func) | |
315 (defvar listing-style) | |
316 (defvar numeric-uid-gid) | |
317 (defvar reverse-list) | |
318 (defvar show-all) | |
319 (defvar show-recursive) | |
320 (defvar show-size) | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
321 (defvar sort-method) |
66589
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
322 (defvar ange-cache) |
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
323 (defvar dired-flag)) |
29876 | 324 |
325 (defun eshell-do-ls (&rest args) | |
326 "Implementation of \"ls\" in Lisp, passing ARGS." | |
327 (funcall flush-func -1) | |
328 ;; process the command arguments, and begin listing files | |
329 (eshell-eval-using-options | |
33020 | 330 "ls" (if eshell-ls-initial-args |
331 (list eshell-ls-initial-args args) | |
332 args) | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
333 `((?a "all" nil show-all |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
334 "show all files in directory") |
29876 | 335 (?c nil by-ctime sort-method |
66589
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
336 "sort by last status change time") |
29876 | 337 (?d "directory" nil dir-literal |
338 "list directory entries instead of contents") | |
339 (?k "kilobytes" 1024 block-size | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
340 "using 1024 as the block size") |
29876 | 341 (?h "human-readable" 1024 human-readable |
342 "print sizes in human readable format") | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
343 (?H "si" 1000 human-readable |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
344 "likewise, but use powers of 1000 not 1024") |
29876 | 345 (?I "ignore" t ignore-pattern |
346 "do not list implied entries matching pattern") | |
347 (?l nil long-listing listing-style | |
348 "use a long listing format") | |
349 (?n "numeric-uid-gid" nil numeric-uid-gid | |
350 "list numeric UIDs and GIDs instead of names") | |
351 (?r "reverse" nil reverse-list | |
352 "reverse order while sorting") | |
353 (?s "size" nil show-size | |
354 "print size of each file, in blocks") | |
355 (?t nil by-mtime sort-method | |
356 "sort by modification time") | |
357 (?u nil by-atime sort-method | |
358 "sort by last access time") | |
359 (?x nil by-lines listing-style | |
360 "list entries by lines instead of by columns") | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
361 (?C nil by-columns listing-style |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
362 "list entries by columns") |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
363 (?L "deference" nil dereference-links |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
364 "list entries pointed to by symbolic links") |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
365 (?R "recursive" nil show-recursive |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
366 "list subdirectories recursively") |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
367 (?S nil by-size sort-method |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
368 "sort by file size") |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
369 (?U nil unsorted sort-method |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
370 "do not sort; list entries in directory order") |
29876 | 371 (?X nil by-extension sort-method |
372 "sort alphabetically by entry extension") | |
373 (?1 nil single-column listing-style | |
374 "list one file per line") | |
66589
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
375 (nil "dired" nil dired-flag |
8c8902a666bf
(eshell-do-ls): Added no-op support for --dired flag, to prevent
John Wiegley <johnw@newartisans.com>
parents:
64701
diff
changeset
|
376 "Here for compatibility with GNU ls.") |
29876 | 377 (nil "help" nil nil |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
378 "show this usage display") |
29876 | 379 :external "ls" |
380 :usage "[OPTION]... [FILE]... | |
381 List information about the FILEs (the current directory by default). | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
382 Sort entries alphabetically across.") |
29876 | 383 ;; setup some defaults, based on what the user selected |
384 (unless block-size | |
385 (setq block-size eshell-ls-default-blocksize)) | |
386 (unless listing-style | |
387 (setq listing-style 'by-columns)) | |
388 (unless args | |
389 (setq args (list "."))) | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
390 (let ((eshell-ls-exclude-regexp eshell-ls-exclude-regexp) ange-cache) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
391 (when ignore-pattern |
29876 | 392 (unless (eshell-using-module 'eshell-glob) |
393 (error (concat "-I option requires that `eshell-glob'" | |
394 " be a member of `eshell-modules-list'"))) | |
395 (set-text-properties 0 (length ignore-pattern) nil ignore-pattern) | |
33020 | 396 (setq eshell-ls-exclude-regexp |
397 (if eshell-ls-exclude-regexp | |
29876 | 398 (concat "\\(" eshell-ls-exclude-regexp "\\|" |
33020 | 399 (eshell-glob-regexp ignore-pattern) "\\)") |
400 (eshell-glob-regexp ignore-pattern)))) | |
29876 | 401 ;; list the files! |
402 (eshell-ls-entries | |
403 (mapcar (function | |
404 (lambda (arg) | |
405 (cons (if (and (eshell-under-windows-p) | |
406 (file-name-absolute-p arg)) | |
407 (expand-file-name arg) | |
408 arg) | |
33020 | 409 (eshell-file-attributes arg)))) |
410 args) | |
29876 | 411 t (expand-file-name default-directory))) |
412 (funcall flush-func))) | |
413 | |
414 (defsubst eshell-ls-printable-size (filesize &optional by-blocksize) | |
415 "Return a printable FILESIZE." | |
416 (eshell-printable-size filesize human-readable | |
417 (and by-blocksize block-size) | |
418 eshell-ls-use-colors)) | |
419 | |
420 (defsubst eshell-ls-size-string (attrs size-width) | |
421 "Return the size string for ATTRS length, using SIZE-WIDTH." | |
422 (let* ((str (eshell-ls-printable-size (nth 7 attrs) t)) | |
423 (len (length str))) | |
424 (if (< len size-width) | |
425 (concat (make-string (- size-width len) ? ) str) | |
426 str))) | |
427 | |
428 (defun eshell-ls-annotate (fileinfo) | |
429 "Given a FILEINFO object, return a resolved, decorated FILEINFO. | |
430 This means resolving any symbolic links, determining what face the | |
431 name should be displayed as, etc. Think of it as cooking a FILEINFO." | |
432 (if (not (and (stringp (cadr fileinfo)) | |
433 (or dereference-links | |
434 (eq listing-style 'long-listing)))) | |
435 (setcar fileinfo (eshell-ls-decorated-name fileinfo)) | |
436 (let (dir attr) | |
437 (unless (file-name-absolute-p (cadr fileinfo)) | |
438 (setq dir (file-truename | |
439 (file-name-directory | |
440 (expand-file-name (car fileinfo)))))) | |
441 (setq attr | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
442 (eshell-file-attributes |
29876 | 443 (let ((target (if dir |
444 (expand-file-name (cadr fileinfo) dir) | |
445 (cadr fileinfo)))) | |
446 (if dereference-links | |
447 (file-truename target) | |
448 target)))) | |
449 (if (or dereference-links | |
450 (string-match "^\\.\\.?$" (car fileinfo))) | |
451 (progn | |
452 (setcdr fileinfo attr) | |
453 (setcar fileinfo (eshell-ls-decorated-name fileinfo))) | |
454 (assert (eq listing-style 'long-listing)) | |
455 (setcar fileinfo | |
456 (concat (eshell-ls-decorated-name fileinfo) " -> " | |
457 (eshell-ls-decorated-name | |
458 (cons (cadr fileinfo) attr))))))) | |
459 fileinfo) | |
460 | |
461 (defun eshell-ls-file (fileinfo &optional size-width copy-fileinfo) | |
462 "Output FILE in long format. | |
463 FILE may be a string, or a cons cell whose car is the filename and | |
464 whose cdr is the list of file attributes." | |
465 (if (not (cdr fileinfo)) | |
466 (funcall error-func (format "%s: No such file or directory\n" | |
467 (car fileinfo))) | |
468 (setq fileinfo | |
469 (eshell-ls-annotate (if copy-fileinfo | |
470 (cons (car fileinfo) | |
471 (cdr fileinfo)) | |
472 fileinfo))) | |
473 (let ((file (car fileinfo)) | |
474 (attrs (cdr fileinfo))) | |
475 (if (not (eq listing-style 'long-listing)) | |
476 (if show-size | |
477 (funcall insert-func (eshell-ls-size-string attrs size-width) | |
478 " " file "\n") | |
479 (funcall insert-func file "\n")) | |
480 (let ((line | |
481 (concat | |
482 (if show-size | |
483 (concat (eshell-ls-size-string attrs size-width) " ")) | |
484 (format | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
485 "%s%4d %-8s %-8s " |
29876 | 486 (or (nth 8 attrs) "??????????") |
487 (or (nth 1 attrs) 0) | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
488 (or (let ((user (nth 2 attrs))) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
489 (and (not numeric-uid-gid) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
490 user |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
491 (eshell-substring |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
492 (if (numberp user) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
493 (user-login-name user) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
494 user) 8))) |
29876 | 495 (nth 2 attrs) |
496 "") | |
32446
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
497 (or (let ((group (nth 3 attrs))) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
498 (and (not numeric-uid-gid) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
499 group |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
500 (eshell-substring |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
501 (if (numberp group) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
502 (eshell-group-name group) |
aab90b31807c
Added better remote directory support to Eshell, as well as a few bug
John Wiegley <johnw@newartisans.com>
parents:
31241
diff
changeset
|
503 group) 8))) |
29876 | 504 (nth 3 attrs) |
505 "")) | |
506 (let* ((str (eshell-ls-printable-size (nth 7 attrs))) | |
507 (len (length str))) | |
53080
76ece241e712
(eshell-ls-file): There are times with size-width is nil and
John Wiegley <johnw@newartisans.com>
parents:
53066
diff
changeset
|
508 (if (< len (or size-width 4)) |
76ece241e712
(eshell-ls-file): There are times with size-width is nil and
John Wiegley <johnw@newartisans.com>
parents:
53066
diff
changeset
|
509 (concat (make-string (- (or size-width 4) len) ? ) str) |
29876 | 510 str)) |
511 " " (format-time-string | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
512 (concat |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
513 "%b %e " |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
514 (if (= (nth 5 (decode-time (current-time))) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
515 (nth 5 (decode-time |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
516 (nth (cond |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
517 ((eq sort-method 'by-atime) 4) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
518 ((eq sort-method 'by-ctime) 6) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
519 (t 5)) attrs)))) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
520 "%H:%M" |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
521 " %Y")) (nth (cond |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
522 ((eq sort-method 'by-atime) 4) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
523 ((eq sort-method 'by-ctime) 6) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
524 (t 5)) attrs)) " "))) |
29876 | 525 (funcall insert-func line file "\n")))))) |
526 | |
527 (defun eshell-ls-dir (dirinfo &optional insert-name root-dir size-width) | |
528 "Output the entries in DIRINFO. | |
529 If INSERT-NAME is non-nil, the name of DIRINFO will be output. If | |
530 ROOT-DIR is also non-nil, and a directory name, DIRINFO will be output | |
531 relative to that directory." | |
532 (let ((dir (car dirinfo))) | |
533 (if (not (cdr dirinfo)) | |
534 (funcall error-func (format "%s: No such file or directory\n" dir)) | |
535 (if dir-literal | |
536 (eshell-ls-file dirinfo size-width) | |
537 (if insert-name | |
538 (funcall insert-func | |
539 (eshell-ls-decorated-name | |
540 (cons (concat | |
541 (if root-dir | |
542 (file-relative-name dir root-dir) | |
543 (expand-file-name dir))) | |
544 (cdr dirinfo))) ":\n")) | |
33020 | 545 (let ((entries (eshell-directory-files-and-attributes |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
546 dir nil (and (not show-all) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
547 eshell-ls-exclude-hidden |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
548 "\\`[^.]") t))) |
33020 | 549 (when (and (not show-all) eshell-ls-exclude-regexp) |
550 (while (and entries (string-match eshell-ls-exclude-regexp | |
551 (caar entries))) | |
29876 | 552 (setq entries (cdr entries))) |
553 (let ((e entries)) | |
554 (while (cdr e) | |
555 (if (string-match eshell-ls-exclude-regexp (car (cadr e))) | |
556 (setcdr e (cddr e)) | |
557 (setq e (cdr e)))))) | |
558 (when (or (eq listing-style 'long-listing) show-size) | |
559 (let ((total 0.0)) | |
560 (setq size-width 0) | |
561 (eshell-for e entries | |
562 (if (nth 7 (cdr e)) | |
563 (setq total (+ total (nth 7 (cdr e))) | |
564 size-width | |
565 (max size-width | |
566 (length (eshell-ls-printable-size | |
567 (nth 7 (cdr e)) t)))))) | |
568 (funcall insert-func "total " | |
569 (eshell-ls-printable-size total t) "\n"))) | |
570 (let ((default-directory (expand-file-name dir))) | |
571 (if show-recursive | |
572 (eshell-ls-entries | |
573 (let ((e entries) (good-entries (list t))) | |
574 (while e | |
575 (unless (let ((len (length (caar e)))) | |
576 (and (eq (aref (caar e) 0) ?.) | |
577 (or (= len 1) | |
578 (and (= len 2) | |
579 (eq (aref (caar e) 1) ?.))))) | |
580 (nconc good-entries (list (car e)))) | |
581 (setq e (cdr e))) | |
582 (cdr good-entries)) | |
583 nil root-dir) | |
584 (eshell-ls-files (eshell-ls-sort-entries entries) | |
585 size-width)))))))) | |
586 | |
587 (defsubst eshell-ls-compare-entries (l r inx func) | |
588 "Compare the time of two files, L and R, the attribute indexed by INX." | |
589 (let ((lt (nth inx (cdr l))) | |
590 (rt (nth inx (cdr r)))) | |
591 (if (equal lt rt) | |
592 (string-lessp (directory-file-name (car l)) | |
593 (directory-file-name (car r))) | |
594 (funcall func rt lt)))) | |
595 | |
596 (defun eshell-ls-sort-entries (entries) | |
597 "Sort the given ENTRIES, which may be files, directories or both. | |
598 In Eshell's implementation of ls, ENTRIES is always reversed." | |
599 (if (eq sort-method 'unsorted) | |
600 (nreverse entries) | |
601 (sort entries | |
602 (function | |
603 (lambda (l r) | |
604 (let ((result | |
605 (cond | |
606 ((eq sort-method 'by-atime) | |
33020 | 607 (eshell-ls-compare-entries l r 4 'eshell-time-less-p)) |
29876 | 608 ((eq sort-method 'by-mtime) |
33020 | 609 (eshell-ls-compare-entries l r 5 'eshell-time-less-p)) |
29876 | 610 ((eq sort-method 'by-ctime) |
33020 | 611 (eshell-ls-compare-entries l r 6 'eshell-time-less-p)) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
612 ((eq sort-method 'by-size) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
613 (eshell-ls-compare-entries l r 7 '<)) |
29876 | 614 ((eq sort-method 'by-extension) |
615 (let ((lx (file-name-extension | |
616 (directory-file-name (car l)))) | |
617 (rx (file-name-extension | |
618 (directory-file-name (car r))))) | |
619 (cond | |
620 ((or (and (not lx) (not rx)) | |
621 (equal lx rx)) | |
622 (string-lessp (directory-file-name (car l)) | |
623 (directory-file-name (car r)))) | |
624 ((not lx) t) | |
625 ((not rx) nil) | |
626 (t | |
627 (string-lessp lx rx))))) | |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
628 (t |
29876 | 629 (string-lessp (directory-file-name (car l)) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
630 (directory-file-name (car r))))))) |
29876 | 631 (if reverse-list |
632 (not result) | |
633 result))))))) | |
634 | |
635 (defun eshell-ls-files (files &optional size-width copy-fileinfo) | |
636 "Output a list of FILES. | |
637 Each member of FILES is either a string or a cons cell of the form | |
638 \(FILE . ATTRS)." | |
639 (if (memq listing-style '(long-listing single-column)) | |
640 (eshell-for file files | |
641 (if file | |
642 (eshell-ls-file file size-width copy-fileinfo))) | |
643 (let ((f files) | |
644 last-f | |
645 display-files | |
646 ignore) | |
647 (while f | |
648 (if (cdar f) | |
649 (setq last-f f | |
650 f (cdr f)) | |
651 (unless ignore | |
652 (funcall error-func | |
653 (format "%s: No such file or directory\n" (caar f)))) | |
654 (if (eq f files) | |
655 (setq files (cdr files) | |
656 f files) | |
657 (if (not (cdr f)) | |
658 (progn | |
659 (setcdr last-f nil) | |
660 (setq f nil)) | |
661 (setcar f (cadr f)) | |
662 (setcdr f (cddr f)))))) | |
663 (if (not show-size) | |
664 (setq display-files (mapcar 'eshell-ls-annotate files)) | |
665 (eshell-for file files | |
666 (let* ((str (eshell-ls-printable-size (nth 7 (cdr file)) t)) | |
667 (len (length str))) | |
668 (if (< len size-width) | |
669 (setq str (concat (make-string (- size-width len) ? ) str))) | |
670 (setq file (eshell-ls-annotate file) | |
671 display-files (cons (cons (concat str " " (car file)) | |
672 (cdr file)) | |
673 display-files)))) | |
674 (setq display-files (nreverse display-files))) | |
675 (let* ((col-vals | |
676 (if (eq listing-style 'by-columns) | |
677 (eshell-ls-find-column-lengths display-files) | |
678 (assert (eq listing-style 'by-lines)) | |
679 (eshell-ls-find-column-widths display-files))) | |
680 (col-widths (car col-vals)) | |
681 (display-files (cdr col-vals)) | |
682 (columns (length col-widths)) | |
683 (col-index 1) | |
684 need-return) | |
685 (eshell-for file display-files | |
686 (let ((name | |
687 (if (car file) | |
688 (if show-size | |
689 (concat (substring (car file) 0 size-width) | |
690 (eshell-ls-decorated-name | |
691 (cons (substring (car file) size-width) | |
692 (cdr file)))) | |
693 (eshell-ls-decorated-name file)) | |
694 ""))) | |
695 (if (< col-index columns) | |
696 (setq need-return | |
697 (concat need-return name | |
698 (make-string | |
699 (max 0 (- (aref col-widths | |
700 (1- col-index)) | |
701 (length name))) ? )) | |
702 col-index (1+ col-index)) | |
703 (funcall insert-func need-return name "\n") | |
704 (setq col-index 1 need-return nil)))) | |
705 (if need-return | |
706 (funcall insert-func need-return "\n")))))) | |
707 | |
708 (defun eshell-ls-entries (entries &optional separate root-dir) | |
709 "Output PATH's directory ENTRIES, formatted according to OPTIONS. | |
710 Each member of ENTRIES may either be a string or a cons cell, the car | |
711 of which is the file name, and the cdr of which is the list of | |
712 attributes. | |
713 If SEPARATE is non-nil, directories name will be entirely separated | |
714 from the filenames. This is the normal behavior, except when doing a | |
715 recursive listing. | |
716 ROOT-DIR, if non-nil, specifies the root directory of the listing, to | |
717 which non-absolute directory names will be made relative if ever they | |
718 need to be printed." | |
719 (let (dirs files show-names need-return (size-width 0)) | |
720 (eshell-for entry entries | |
721 (if (and (not dir-literal) | |
722 (or (eshell-ls-filetype-p (cdr entry) ?d) | |
723 (and (eshell-ls-filetype-p (cdr entry) ?l) | |
724 (file-directory-p (car entry))))) | |
725 (progn | |
726 (unless separate | |
727 (setq files (cons entry files) | |
728 size-width | |
729 (if show-size | |
730 (max size-width | |
731 (length (eshell-ls-printable-size | |
732 (nth 7 (cdr entry)) t)))))) | |
733 (setq dirs (cons entry dirs))) | |
734 (setq files (cons entry files) | |
735 size-width | |
736 (if show-size | |
737 (max size-width | |
738 (length (eshell-ls-printable-size | |
739 (nth 7 (cdr entry)) t))))))) | |
740 (when files | |
741 (eshell-ls-files (eshell-ls-sort-entries files) | |
742 size-width show-recursive) | |
743 (setq need-return t)) | |
744 (setq show-names (or show-recursive | |
745 (> (+ (length files) (length dirs)) 1))) | |
746 (eshell-for dir (eshell-ls-sort-entries dirs) | |
747 (if (and need-return (not dir-literal)) | |
748 (funcall insert-func "\n")) | |
749 (eshell-ls-dir dir show-names | |
33020 | 750 (unless (file-name-absolute-p (car dir)) root-dir) |
751 size-width) | |
29876 | 752 (setq need-return t)))) |
753 | |
754 (defun eshell-ls-find-column-widths (files) | |
755 "Find the best fitting column widths for FILES. | |
756 It will be returned as a vector, whose length is the number of columns | |
757 to use, and each member of which is the width of that column | |
758 \(including spacing)." | |
759 (let* ((numcols 0) | |
760 (width 0) | |
761 (widths | |
762 (mapcar | |
763 (function | |
764 (lambda (file) | |
765 (+ 2 (length (car file))))) | |
766 files)) | |
767 ;; must account for the added space... | |
768 (max-width (+ (window-width) 2)) | |
769 (best-width 0) | |
770 col-widths) | |
771 | |
772 ;; determine the largest number of columns in the first row | |
773 (let ((w widths)) | |
774 (while (and w (< width max-width)) | |
775 (setq width (+ width (car w)) | |
776 numcols (1+ numcols) | |
777 w (cdr w)))) | |
778 | |
779 ;; refine it based on the following rows | |
780 (while (> numcols 0) | |
781 (let ((i 0) | |
782 (colw (make-vector numcols 0)) | |
783 (w widths)) | |
784 (while w | |
785 (if (= i numcols) | |
786 (setq i 0)) | |
787 (aset colw i (max (aref colw i) (car w))) | |
788 (setq w (cdr w) i (1+ i))) | |
789 (setq i 0 width 0) | |
790 (while (< i numcols) | |
791 (setq width (+ width (aref colw i)) | |
792 i (1+ i))) | |
793 (if (and (< width max-width) | |
794 (> width best-width)) | |
795 (setq col-widths colw | |
796 best-width width))) | |
797 (setq numcols (1- numcols))) | |
798 | |
799 (cons (or col-widths (vector max-width)) files))) | |
800 | |
801 (defun eshell-ls-find-column-lengths (files) | |
802 "Find the best fitting column lengths for FILES. | |
803 It will be returned as a vector, whose length is the number of columns | |
804 to use, and each member of which is the width of that column | |
805 \(including spacing)." | |
806 (let* ((numcols 1) | |
807 (width 0) | |
808 (widths | |
809 (mapcar | |
810 (function | |
811 (lambda (file) | |
812 (+ 2 (length (car file))))) | |
813 files)) | |
814 (max-width (+ (window-width) 2)) | |
815 col-widths | |
816 colw) | |
817 | |
818 ;; refine it based on the following rows | |
819 (while numcols | |
820 (let* ((rows (ceiling (/ (length widths) | |
821 (float numcols)))) | |
822 (w widths) | |
823 (len (* rows numcols)) | |
824 (index 0) | |
825 (i 0)) | |
826 (setq width 0) | |
827 (unless (or (= rows 0) | |
828 (<= (/ (length widths) (float rows)) | |
829 (float (1- numcols)))) | |
830 (setq colw (make-vector numcols 0)) | |
831 (while (> len 0) | |
832 (if (= i numcols) | |
833 (setq i 0 index (1+ index))) | |
834 (aset colw i | |
835 (max (aref colw i) | |
836 (or (nth (+ (* i rows) index) w) 0))) | |
837 (setq len (1- len) i (1+ i))) | |
838 (setq i 0) | |
839 (while (< i numcols) | |
840 (setq width (+ width (aref colw i)) | |
841 i (1+ i)))) | |
842 (if (>= width max-width) | |
843 (setq numcols nil) | |
844 (if colw | |
845 (setq col-widths colw)) | |
846 (if (>= numcols (length widths)) | |
847 (setq numcols nil) | |
848 (setq numcols (1+ numcols)))))) | |
849 | |
850 (if (not col-widths) | |
851 (cons (vector max-width) files) | |
852 (setq numcols (length col-widths)) | |
853 (let* ((rows (ceiling (/ (length widths) | |
854 (float numcols)))) | |
855 (len (* rows numcols)) | |
856 (newfiles (make-list len nil)) | |
857 (index 0) | |
858 (i 0) | |
859 (j 0)) | |
860 (while (< j len) | |
861 (if (= i numcols) | |
862 (setq i 0 index (1+ index))) | |
863 (setcar (nthcdr j newfiles) | |
864 (nth (+ (* i rows) index) files)) | |
865 (setq j (1+ j) i (1+ i))) | |
866 (cons col-widths newfiles))))) | |
867 | |
868 (defun eshell-ls-decorated-name (file) | |
64560
8e6e95602853
(eshell-ls-decorated-name): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents:
64085
diff
changeset
|
869 "Return FILE, possibly decorated." |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
870 (if eshell-ls-use-colors |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
871 (let ((face |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
872 (cond |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
873 ((not (cdr file)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
874 'eshell-ls-missing) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
875 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
876 ((stringp (cadr file)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
877 'eshell-ls-symlink) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
878 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
879 ((eq (cadr file) t) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
880 'eshell-ls-directory) |
29876 | 881 |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
882 ((not (eshell-ls-filetype-p (cdr file) ?-)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
883 'eshell-ls-special) |
29876 | 884 |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
885 ((and (/= (user-uid) 0) ; root can execute anything |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
886 (eshell-ls-applicable (cdr file) 3 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
887 'file-executable-p (car file))) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
888 'eshell-ls-executable) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
889 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
890 ((not (eshell-ls-applicable (cdr file) 1 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
891 'file-readable-p (car file))) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
892 'eshell-ls-unreadable) |
29876 | 893 |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
894 ((string-match eshell-ls-archive-regexp (car file)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
895 'eshell-ls-archive) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
896 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
897 ((string-match eshell-ls-backup-regexp (car file)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
898 'eshell-ls-backup) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
899 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
900 ((string-match eshell-ls-product-regexp (car file)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
901 'eshell-ls-product) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
902 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
903 ((string-match eshell-ls-clutter-regexp (car file)) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
904 'eshell-ls-clutter) |
29876 | 905 |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
906 ((not (eshell-ls-applicable (cdr file) 2 |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
907 'file-writable-p (car file))) |
63533
b7ea6515f1ba
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Miles Bader <miles@gnu.org>
parents:
53080
diff
changeset
|
908 'eshell-ls-readonly) |
46853
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
909 (eshell-ls-highlight-alist |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
910 (let ((tests eshell-ls-highlight-alist) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
911 value) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
912 (while tests |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
913 (if (funcall (caar tests) (car file) (cdr file)) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
914 (setq value (cdar tests) tests nil) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
915 (setq tests (cdr tests)))) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
916 value))))) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
917 (if face |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
918 (add-text-properties 0 (length (car file)) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
919 (list 'face face) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
920 (car file))))) |
cb339473da3b
I did not mean to check in these changes yet, they are still
John Wiegley <johnw@newartisans.com>
parents:
46852
diff
changeset
|
921 (car file)) |
29876 | 922 |
87069
592ff64540d2
Require individual files if needed when compiling, rather than
Glenn Morris <rgm@gnu.org>
parents:
78220
diff
changeset
|
923 (provide 'em-ls) |
29876 | 924 |
95152
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
925 ;; Local Variables: |
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
926 ;; generated-autoload-file: "esh-groups.el" |
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
927 ;; End: |
ad5d26b1d5d1
Use eshell-defgroup rather than defgroup.
Glenn Morris <rgm@gnu.org>
parents:
94661
diff
changeset
|
928 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
929 ;; arch-tag: 9295181c-0cb2-499c-999b-89f5359842cb |
29876 | 930 ;;; em-ls.el ends here |