aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorMiles Bader2005-06-17 05:27:55 +0000
committerMiles Bader2005-06-17 05:27:55 +0000
commit958e68763bd714013e01afcffc3e4a5ad4ddbee6 (patch)
tree9377511d30db7b4912ce54ba3aa62ed961b4790e /lisp/eshell
parent579322ca428f5d45be31933b5b9f510ac795253b (diff)
downloademacs-958e68763bd714013e01afcffc3e4a5ad4ddbee6.tar.gz
emacs-958e68763bd714013e01afcffc3e4a5ad4ddbee6.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Remove "-face" suffix from eshell faces 2005-06-17 Miles Bader <miles@gnu.org> * lisp/eshell/esh-test.el (eshell-test-ok, eshell-test-failed): Remove "-face" suffix from face names. (eshell-test-ok-face, eshell-test-failed-face): New backward-compatibility aliases for renamed faces. (eshell-run-test): Use renamed eshell-test faces. * lisp/eshell/em-prompt.el (eshell-prompt): Remove "-face" suffix from face name. (eshell-prompt-face): New backward-compatibility alias for renamed face. (eshell-emit-prompt): Use renamed eshell-prompt face. * lisp/eshell/em-ls.el (eshell-ls-directory, eshell-ls-symlink) (eshell-ls-executable, eshell-ls-readonly, eshell-ls-unreadable) (eshell-ls-special, eshell-ls-missing, eshell-ls-archive) (eshell-ls-backup, eshell-ls-product, eshell-ls-clutter): Remove "-face" suffix from face names. (eshell-ls-directory-face, eshell-ls-symlink-face) (eshell-ls-executable-face, eshell-ls-readonly-face) (eshell-ls-unreadable-face, eshell-ls-special-face) (eshell-ls-missing-face, eshell-ls-archive-face) (eshell-ls-backup-face, eshell-ls-product-face) (eshell-ls-clutter-face): New backward-compatibility aliases for renamed faces. (eshell-ls-decorated-name): Use renamed eshell-ls faces.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-ls.el68
-rw-r--r--lisp/eshell/em-prompt.el8
-rw-r--r--lisp/eshell/esh-test.el16
3 files changed, 59 insertions, 33 deletions
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 3b5252c18a1..4d06b1bdca0 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -1,6 +1,6 @@
1;;; em-ls.el --- implementation of ls in Lisp 1;;; em-ls.el --- implementation of ls in Lisp
2 2
3;; Copyright (C) 1999, 2000 Free Software Foundation 3;; Copyright (C) 1999, 2000, 2005 Free Software Foundation
4 4
5;; Author: John Wiegley <johnw@gnu.org> 5;; Author: John Wiegley <johnw@gnu.org>
6 6
@@ -106,48 +106,62 @@ faster and conserves more memory."
106 :type 'boolean 106 :type 'boolean
107 :group 'eshell-ls) 107 :group 'eshell-ls)
108 108
109(defface eshell-ls-directory-face 109(defface eshell-ls-directory
110 '((((class color) (background light)) (:foreground "Blue" :weight bold)) 110 '((((class color) (background light)) (:foreground "Blue" :weight bold))
111 (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) 111 (((class color) (background dark)) (:foreground "SkyBlue" :weight bold))
112 (t (:weight bold))) 112 (t (:weight bold)))
113 "*The face used for highlight directories." 113 "*The face used for highlight directories."
114 :group 'eshell-ls) 114 :group 'eshell-ls)
115;; backward-compatibility alias
116(put 'eshell-ls-directory-face 'face-alias 'eshell-ls-directory)
115 117
116(defface eshell-ls-symlink-face 118(defface eshell-ls-symlink
117 '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) 119 '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold))
118 (((class color) (background dark)) (:foreground "Cyan" :weight bold))) 120 (((class color) (background dark)) (:foreground "Cyan" :weight bold)))
119 "*The face used for highlight symbolic links." 121 "*The face used for highlight symbolic links."
120 :group 'eshell-ls) 122 :group 'eshell-ls)
123;; backward-compatibility alias
124(put 'eshell-ls-symlink-face 'face-alias 'eshell-ls-symlink)
121 125
122(defface eshell-ls-executable-face 126(defface eshell-ls-executable
123 '((((class color) (background light)) (:foreground "ForestGreen" :weight bold)) 127 '((((class color) (background light)) (:foreground "ForestGreen" :weight bold))
124 (((class color) (background dark)) (:foreground "Green" :weight bold))) 128 (((class color) (background dark)) (:foreground "Green" :weight bold)))
125 "*The face used for highlighting executables (not directories, though)." 129 "*The face used for highlighting executables (not directories, though)."
126 :group 'eshell-ls) 130 :group 'eshell-ls)
131;; backward-compatibility alias
132(put 'eshell-ls-executable-face 'face-alias 'eshell-ls-executable)
127 133
128(defface eshell-ls-readonly-face 134(defface eshell-ls-readonly
129 '((((class color) (background light)) (:foreground "Brown")) 135 '((((class color) (background light)) (:foreground "Brown"))
130 (((class color) (background dark)) (:foreground "Pink"))) 136 (((class color) (background dark)) (:foreground "Pink")))
131 "*The face used for highlighting read-only files." 137 "*The face used for highlighting read-only files."
132 :group 'eshell-ls) 138 :group 'eshell-ls)
139;; backward-compatibility alias
140(put 'eshell-ls-readonly-face 'face-alias 'eshell-ls-readonly)
133 141
134(defface eshell-ls-unreadable-face 142(defface eshell-ls-unreadable
135 '((((class color) (background light)) (:foreground "Grey30")) 143 '((((class color) (background light)) (:foreground "Grey30"))
136 (((class color) (background dark)) (:foreground "DarkGrey"))) 144 (((class color) (background dark)) (:foreground "DarkGrey")))
137 "*The face used for highlighting unreadable files." 145 "*The face used for highlighting unreadable files."
138 :group 'eshell-ls) 146 :group 'eshell-ls)
147;; backward-compatibility alias
148(put 'eshell-ls-unreadable-face 'face-alias 'eshell-ls-unreadable)
139 149
140(defface eshell-ls-special-face 150(defface eshell-ls-special
141 '((((class color) (background light)) (:foreground "Magenta" :weight bold)) 151 '((((class color) (background light)) (:foreground "Magenta" :weight bold))
142 (((class color) (background dark)) (:foreground "Magenta" :weight bold))) 152 (((class color) (background dark)) (:foreground "Magenta" :weight bold)))
143 "*The face used for highlighting non-regular files." 153 "*The face used for highlighting non-regular files."
144 :group 'eshell-ls) 154 :group 'eshell-ls)
155;; backward-compatibility alias
156(put 'eshell-ls-special-face 'face-alias 'eshell-ls-special)
145 157
146(defface eshell-ls-missing-face 158(defface eshell-ls-missing
147 '((((class color) (background light)) (:foreground "Red" :weight bold)) 159 '((((class color) (background light)) (:foreground "Red" :weight bold))
148 (((class color) (background dark)) (:foreground "Red" :weight bold))) 160 (((class color) (background dark)) (:foreground "Red" :weight bold)))
149 "*The face used for highlighting non-existant file names." 161 "*The face used for highlighting non-existant file names."
150 :group 'eshell-ls) 162 :group 'eshell-ls)
163;; backward-compatibility alias
164(put 'eshell-ls-missing-face 'face-alias 'eshell-ls-missing)
151 165
152(defcustom eshell-ls-archive-regexp 166(defcustom eshell-ls-archive-regexp
153 (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" 167 (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|"
@@ -158,11 +172,13 @@ files."
158 :type 'regexp 172 :type 'regexp
159 :group 'eshell-ls) 173 :group 'eshell-ls)
160 174
161(defface eshell-ls-archive-face 175(defface eshell-ls-archive
162 '((((class color) (background light)) (:foreground "Orchid" :weight bold)) 176 '((((class color) (background light)) (:foreground "Orchid" :weight bold))
163 (((class color) (background dark)) (:foreground "Orchid" :weight bold))) 177 (((class color) (background dark)) (:foreground "Orchid" :weight bold)))
164 "*The face used for highlighting archived and compressed file names." 178 "*The face used for highlighting archived and compressed file names."
165 :group 'eshell-ls) 179 :group 'eshell-ls)
180;; backward-compatibility alias
181(put 'eshell-ls-archive-face 'face-alias 'eshell-ls-archive)
166 182
167(defcustom eshell-ls-backup-regexp 183(defcustom eshell-ls-backup-regexp
168 "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)" 184 "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)"
@@ -170,11 +186,13 @@ files."
170 :type 'regexp 186 :type 'regexp
171 :group 'eshell-ls) 187 :group 'eshell-ls)
172 188
173(defface eshell-ls-backup-face 189(defface eshell-ls-backup
174 '((((class color) (background light)) (:foreground "OrangeRed")) 190 '((((class color) (background light)) (:foreground "OrangeRed"))
175 (((class color) (background dark)) (:foreground "LightSalmon"))) 191 (((class color) (background dark)) (:foreground "LightSalmon")))
176 "*The face used for highlighting backup file names." 192 "*The face used for highlighting backup file names."
177 :group 'eshell-ls) 193 :group 'eshell-ls)
194;; backward-compatibility alias
195(put 'eshell-ls-backup-face 'face-alias 'eshell-ls-backup)
178 196
179(defcustom eshell-ls-product-regexp 197(defcustom eshell-ls-product-regexp
180 "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'" 198 "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'"
@@ -184,11 +202,13 @@ ought to be recreatable if they are deleted."
184 :type 'regexp 202 :type 'regexp
185 :group 'eshell-ls) 203 :group 'eshell-ls)
186 204
187(defface eshell-ls-product-face 205(defface eshell-ls-product
188 '((((class color) (background light)) (:foreground "OrangeRed")) 206 '((((class color) (background light)) (:foreground "OrangeRed"))
189 (((class color) (background dark)) (:foreground "LightSalmon"))) 207 (((class color) (background dark)) (:foreground "LightSalmon")))
190 "*The face used for highlighting files that are build products." 208 "*The face used for highlighting files that are build products."
191 :group 'eshell-ls) 209 :group 'eshell-ls)
210;; backward-compatibility alias
211(put 'eshell-ls-product-face 'face-alias 'eshell-ls-product)
192 212
193(defcustom eshell-ls-clutter-regexp 213(defcustom eshell-ls-clutter-regexp
194 "\\(^texput\\.log\\|^core\\)\\'" 214 "\\(^texput\\.log\\|^core\\)\\'"
@@ -198,11 +218,13 @@ really need to stick around for very long."
198 :type 'regexp 218 :type 'regexp
199 :group 'eshell-ls) 219 :group 'eshell-ls)
200 220
201(defface eshell-ls-clutter-face 221(defface eshell-ls-clutter
202 '((((class color) (background light)) (:foreground "OrangeRed" :weight bold)) 222 '((((class color) (background light)) (:foreground "OrangeRed" :weight bold))
203 (((class color) (background dark)) (:foreground "OrangeRed" :weight bold))) 223 (((class color) (background dark)) (:foreground "OrangeRed" :weight bold)))
204 "*The face used for highlighting junk file names." 224 "*The face used for highlighting junk file names."
205 :group 'eshell-ls) 225 :group 'eshell-ls)
226;; backward-compatibility alias
227(put 'eshell-ls-clutter-face 'face-alias 'eshell-ls-clutter)
206 228
207(defsubst eshell-ls-filetype-p (attrs type) 229(defsubst eshell-ls-filetype-p (attrs type)
208 "Test whether ATTRS specifies a directory." 230 "Test whether ATTRS specifies a directory."
@@ -847,41 +869,41 @@ Use TRUENAME for predicate tests, if passed."
847 (let ((face 869 (let ((face
848 (cond 870 (cond
849 ((not (cdr file)) 871 ((not (cdr file))
850 'eshell-ls-missing-face) 872 'eshell-ls-missing)
851 873
852 ((stringp (cadr file)) 874 ((stringp (cadr file))
853 'eshell-ls-symlink-face) 875 'eshell-ls-symlink)
854 876
855 ((eq (cadr file) t) 877 ((eq (cadr file) t)
856 'eshell-ls-directory-face) 878 'eshell-ls-directory)
857 879
858 ((not (eshell-ls-filetype-p (cdr file) ?-)) 880 ((not (eshell-ls-filetype-p (cdr file) ?-))
859 'eshell-ls-special-face) 881 'eshell-ls-special)
860 882
861 ((and (/= (user-uid) 0) ; root can execute anything 883 ((and (/= (user-uid) 0) ; root can execute anything
862 (eshell-ls-applicable (cdr file) 3 884 (eshell-ls-applicable (cdr file) 3
863 'file-executable-p (car file))) 885 'file-executable-p (car file)))
864 'eshell-ls-executable-face) 886 'eshell-ls-executable)
865 887
866 ((not (eshell-ls-applicable (cdr file) 1 888 ((not (eshell-ls-applicable (cdr file) 1
867 'file-readable-p (car file))) 889 'file-readable-p (car file)))
868 'eshell-ls-unreadable-face) 890 'eshell-ls-unreadable)
869 891
870 ((string-match eshell-ls-archive-regexp (car file)) 892 ((string-match eshell-ls-archive-regexp (car file))
871 'eshell-ls-archive-face) 893 'eshell-ls-archive)
872 894
873 ((string-match eshell-ls-backup-regexp (car file)) 895 ((string-match eshell-ls-backup-regexp (car file))
874 'eshell-ls-backup-face) 896 'eshell-ls-backup)
875 897
876 ((string-match eshell-ls-product-regexp (car file)) 898 ((string-match eshell-ls-product-regexp (car file))
877 'eshell-ls-product-face) 899 'eshell-ls-product)
878 900
879 ((string-match eshell-ls-clutter-regexp (car file)) 901 ((string-match eshell-ls-clutter-regexp (car file))
880 'eshell-ls-clutter-face) 902 'eshell-ls-clutter)
881 903
882 ((not (eshell-ls-applicable (cdr file) 2 904 ((not (eshell-ls-applicable (cdr file) 2
883 'file-writable-p (car file))) 905 'file-writable-p (car file)))
884 'eshell-ls-readonly-face) 906 'eshell-ls-readonly)
885 (eshell-ls-highlight-alist 907 (eshell-ls-highlight-alist
886 (let ((tests eshell-ls-highlight-alist) 908 (let ((tests eshell-ls-highlight-alist)
887 value) 909 value)
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index e1446d9a8bd..009b09720c6 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -1,6 +1,6 @@
1;;; em-prompt.el --- command prompts 1;;; em-prompt.el --- command prompts
2 2
3;; Copyright (C) 1999, 2000 Free Software Foundation 3;; Copyright (C) 1999, 2000, 2005 Free Software Foundation
4 4
5;; Author: John Wiegley <johnw@gnu.org> 5;; Author: John Wiegley <johnw@gnu.org>
6 6
@@ -68,7 +68,7 @@ re-entered for it to take effect."
68 :type 'boolean 68 :type 'boolean
69 :group 'eshell-prompt) 69 :group 'eshell-prompt)
70 70
71(defface eshell-prompt-face 71(defface eshell-prompt
72 '((((class color) (background light)) (:foreground "Red" :bold t)) 72 '((((class color) (background light)) (:foreground "Red" :bold t))
73 (((class color) (background dark)) (:foreground "Pink" :bold t)) 73 (((class color) (background dark)) (:foreground "Pink" :bold t))
74 (t (:bold t))) 74 (t (:bold t)))
@@ -76,6 +76,8 @@ re-entered for it to take effect."
76For highlighting other kinds of strings -- similar to shell mode's 76For highlighting other kinds of strings -- similar to shell mode's
77behavior -- simply use an output filer which changes text properties." 77behavior -- simply use an output filer which changes text properties."
78 :group 'eshell-prompt) 78 :group 'eshell-prompt)
79;; backward-compatibility alias
80(put 'eshell-prompt-face 'face-alias 'eshell-prompt)
79 81
80(defcustom eshell-before-prompt-hook nil 82(defcustom eshell-before-prompt-hook nil
81 "*A list of functions to call before outputting the prompt." 83 "*A list of functions to call before outputting the prompt."
@@ -119,7 +121,7 @@ arriving, or after."
119 (and eshell-highlight-prompt 121 (and eshell-highlight-prompt
120 (add-text-properties 0 (length prompt) 122 (add-text-properties 0 (length prompt)
121 '(read-only t 123 '(read-only t
122 face eshell-prompt-face 124 face eshell-prompt
123 rear-nonsticky (face read-only)) 125 rear-nonsticky (face read-only))
124 prompt)) 126 prompt))
125 (eshell-interactive-print prompt))) 127 (eshell-interactive-print prompt)))
diff --git a/lisp/eshell/esh-test.el b/lisp/eshell/esh-test.el
index c1b121bbf73..46c253c5833 100644
--- a/lisp/eshell/esh-test.el
+++ b/lisp/eshell/esh-test.el
@@ -1,6 +1,6 @@
1;;; esh-test.el --- Eshell test suite 1;;; esh-test.el --- Eshell test suite
2 2
3;; Copyright (C) 1999, 2000 Free Software Foundation 3;; Copyright (C) 1999, 2000, 2005 Free Software Foundation
4 4
5;; Author: John Wiegley <johnw@gnu.org> 5;; Author: John Wiegley <johnw@gnu.org>
6 6
@@ -42,18 +42,22 @@
42 42
43;;; User Variables: 43;;; User Variables:
44 44
45(defface eshell-test-ok-face 45(defface eshell-test-ok
46 '((((class color) (background light)) (:foreground "Green" :bold t)) 46 '((((class color) (background light)) (:foreground "Green" :bold t))
47 (((class color) (background dark)) (:foreground "Green" :bold t))) 47 (((class color) (background dark)) (:foreground "Green" :bold t)))
48 "*The face used to highlight OK result strings." 48 "*The face used to highlight OK result strings."
49 :group 'eshell-test) 49 :group 'eshell-test)
50;; backward-compatibility alias
51(put 'eshell-test-ok-face 'face-alias 'eshell-test-ok)
50 52
51(defface eshell-test-failed-face 53(defface eshell-test-failed
52 '((((class color) (background light)) (:foreground "OrangeRed" :bold t)) 54 '((((class color) (background light)) (:foreground "OrangeRed" :bold t))
53 (((class color) (background dark)) (:foreground "OrangeRed" :bold t)) 55 (((class color) (background dark)) (:foreground "OrangeRed" :bold t))
54 (t (:bold t))) 56 (t (:bold t)))
55 "*The face used to highlight FAILED result strings." 57 "*The face used to highlight FAILED result strings."
56 :group 'eshell-test) 58 :group 'eshell-test)
59;; backward-compatibility alias
60(put 'eshell-test-failed-face 'face-alias 'eshell-test-failed)
57 61
58(defcustom eshell-show-usage-metrics nil 62(defcustom eshell-show-usage-metrics nil
59 "*If non-nil, display different usage metrics for each Eshell command." 63 "*If non-nil, display different usage metrics for each Eshell command."
@@ -108,12 +112,10 @@
108 (if truth 112 (if truth
109 (progn 113 (progn
110 (setq str " OK ") 114 (setq str " OK ")
111 (put-text-property 0 6 'face 115 (put-text-property 0 6 'face 'eshell-test-ok str))
112 'eshell-test-ok-face str))
113 (setq str "FAILED") 116 (setq str "FAILED")
114 (setq eshell-test-failures (1+ eshell-test-failures)) 117 (setq eshell-test-failures (1+ eshell-test-failures))
115 (put-text-property 0 6 'face 118 (put-text-property 0 6 'face 'eshell-test-failed str))
116 'eshell-test-failed-face str))
117 str) "]") 119 str) "]")
118 (add-text-properties (line-beginning-position) (point) 120 (add-text-properties (line-beginning-position) (point)
119 (list 'test-func funcsym)) 121 (list 'test-func funcsym))