From: Miles Bader Date: Fri, 17 Jun 2005 05:27:55 +0000 (+0000) Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431 X-Git-Tag: emacs-pretest-22.0.90~8851 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=958e68763bd714013e01afcffc3e4a5ad4ddbee6;p=emacs.git Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431 Remove "-face" suffix from eshell faces 2005-06-17 Miles Bader * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4fef41319b..966795f4036 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,30 @@ 2005-06-17 Miles Bader + * 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. + + * 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. + + * 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. + * progmodes/cc-fonts.el (c-nonbreakable-space-face): Remove "-face" suffix from face name. (c-cpp-matchers): Use the variable `c-nonbreakable-space-face' 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 @@ ;;; em-ls.el --- implementation of ls in Lisp -;; Copyright (C) 1999, 2000 Free Software Foundation +;; Copyright (C) 1999, 2000, 2005 Free Software Foundation ;; Author: John Wiegley @@ -106,48 +106,62 @@ faster and conserves more memory." :type 'boolean :group 'eshell-ls) -(defface eshell-ls-directory-face +(defface eshell-ls-directory '((((class color) (background light)) (:foreground "Blue" :weight bold)) (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) (t (:weight bold))) "*The face used for highlight directories." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-directory-face 'face-alias 'eshell-ls-directory) -(defface eshell-ls-symlink-face +(defface eshell-ls-symlink '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) (((class color) (background dark)) (:foreground "Cyan" :weight bold))) "*The face used for highlight symbolic links." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-symlink-face 'face-alias 'eshell-ls-symlink) -(defface eshell-ls-executable-face +(defface eshell-ls-executable '((((class color) (background light)) (:foreground "ForestGreen" :weight bold)) (((class color) (background dark)) (:foreground "Green" :weight bold))) "*The face used for highlighting executables (not directories, though)." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-executable-face 'face-alias 'eshell-ls-executable) -(defface eshell-ls-readonly-face +(defface eshell-ls-readonly '((((class color) (background light)) (:foreground "Brown")) (((class color) (background dark)) (:foreground "Pink"))) "*The face used for highlighting read-only files." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-readonly-face 'face-alias 'eshell-ls-readonly) -(defface eshell-ls-unreadable-face +(defface eshell-ls-unreadable '((((class color) (background light)) (:foreground "Grey30")) (((class color) (background dark)) (:foreground "DarkGrey"))) "*The face used for highlighting unreadable files." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-unreadable-face 'face-alias 'eshell-ls-unreadable) -(defface eshell-ls-special-face +(defface eshell-ls-special '((((class color) (background light)) (:foreground "Magenta" :weight bold)) (((class color) (background dark)) (:foreground "Magenta" :weight bold))) "*The face used for highlighting non-regular files." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-special-face 'face-alias 'eshell-ls-special) -(defface eshell-ls-missing-face +(defface eshell-ls-missing '((((class color) (background light)) (:foreground "Red" :weight bold)) (((class color) (background dark)) (:foreground "Red" :weight bold))) "*The face used for highlighting non-existant file names." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-missing-face 'face-alias 'eshell-ls-missing) (defcustom eshell-ls-archive-regexp (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" @@ -158,11 +172,13 @@ files." :type 'regexp :group 'eshell-ls) -(defface eshell-ls-archive-face +(defface eshell-ls-archive '((((class color) (background light)) (:foreground "Orchid" :weight bold)) (((class color) (background dark)) (:foreground "Orchid" :weight bold))) "*The face used for highlighting archived and compressed file names." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-archive-face 'face-alias 'eshell-ls-archive) (defcustom eshell-ls-backup-regexp "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)" @@ -170,11 +186,13 @@ files." :type 'regexp :group 'eshell-ls) -(defface eshell-ls-backup-face +(defface eshell-ls-backup '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) "*The face used for highlighting backup file names." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-backup-face 'face-alias 'eshell-ls-backup) (defcustom eshell-ls-product-regexp "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'" @@ -184,11 +202,13 @@ ought to be recreatable if they are deleted." :type 'regexp :group 'eshell-ls) -(defface eshell-ls-product-face +(defface eshell-ls-product '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) "*The face used for highlighting files that are build products." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-product-face 'face-alias 'eshell-ls-product) (defcustom eshell-ls-clutter-regexp "\\(^texput\\.log\\|^core\\)\\'" @@ -198,11 +218,13 @@ really need to stick around for very long." :type 'regexp :group 'eshell-ls) -(defface eshell-ls-clutter-face +(defface eshell-ls-clutter '((((class color) (background light)) (:foreground "OrangeRed" :weight bold)) (((class color) (background dark)) (:foreground "OrangeRed" :weight bold))) "*The face used for highlighting junk file names." :group 'eshell-ls) +;; backward-compatibility alias +(put 'eshell-ls-clutter-face 'face-alias 'eshell-ls-clutter) (defsubst eshell-ls-filetype-p (attrs type) "Test whether ATTRS specifies a directory." @@ -847,41 +869,41 @@ Use TRUENAME for predicate tests, if passed." (let ((face (cond ((not (cdr file)) - 'eshell-ls-missing-face) + 'eshell-ls-missing) ((stringp (cadr file)) - 'eshell-ls-symlink-face) + 'eshell-ls-symlink) ((eq (cadr file) t) - 'eshell-ls-directory-face) + 'eshell-ls-directory) ((not (eshell-ls-filetype-p (cdr file) ?-)) - 'eshell-ls-special-face) + 'eshell-ls-special) ((and (/= (user-uid) 0) ; root can execute anything (eshell-ls-applicable (cdr file) 3 'file-executable-p (car file))) - 'eshell-ls-executable-face) + 'eshell-ls-executable) ((not (eshell-ls-applicable (cdr file) 1 'file-readable-p (car file))) - 'eshell-ls-unreadable-face) + 'eshell-ls-unreadable) ((string-match eshell-ls-archive-regexp (car file)) - 'eshell-ls-archive-face) + 'eshell-ls-archive) ((string-match eshell-ls-backup-regexp (car file)) - 'eshell-ls-backup-face) + 'eshell-ls-backup) ((string-match eshell-ls-product-regexp (car file)) - 'eshell-ls-product-face) + 'eshell-ls-product) ((string-match eshell-ls-clutter-regexp (car file)) - 'eshell-ls-clutter-face) + 'eshell-ls-clutter) ((not (eshell-ls-applicable (cdr file) 2 'file-writable-p (car file))) - 'eshell-ls-readonly-face) + 'eshell-ls-readonly) (eshell-ls-highlight-alist (let ((tests eshell-ls-highlight-alist) 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 @@ ;;; em-prompt.el --- command prompts -;; Copyright (C) 1999, 2000 Free Software Foundation +;; Copyright (C) 1999, 2000, 2005 Free Software Foundation ;; Author: John Wiegley @@ -68,7 +68,7 @@ re-entered for it to take effect." :type 'boolean :group 'eshell-prompt) -(defface eshell-prompt-face +(defface eshell-prompt '((((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) (t (:bold t))) @@ -76,6 +76,8 @@ re-entered for it to take effect." For highlighting other kinds of strings -- similar to shell mode's behavior -- simply use an output filer which changes text properties." :group 'eshell-prompt) +;; backward-compatibility alias +(put 'eshell-prompt-face 'face-alias 'eshell-prompt) (defcustom eshell-before-prompt-hook nil "*A list of functions to call before outputting the prompt." @@ -119,7 +121,7 @@ arriving, or after." (and eshell-highlight-prompt (add-text-properties 0 (length prompt) '(read-only t - face eshell-prompt-face + face eshell-prompt rear-nonsticky (face read-only)) prompt)) (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 @@ ;;; esh-test.el --- Eshell test suite -;; Copyright (C) 1999, 2000 Free Software Foundation +;; Copyright (C) 1999, 2000, 2005 Free Software Foundation ;; Author: John Wiegley @@ -42,18 +42,22 @@ ;;; User Variables: -(defface eshell-test-ok-face +(defface eshell-test-ok '((((class color) (background light)) (:foreground "Green" :bold t)) (((class color) (background dark)) (:foreground "Green" :bold t))) "*The face used to highlight OK result strings." :group 'eshell-test) +;; backward-compatibility alias +(put 'eshell-test-ok-face 'face-alias 'eshell-test-ok) -(defface eshell-test-failed-face +(defface eshell-test-failed '((((class color) (background light)) (:foreground "OrangeRed" :bold t)) (((class color) (background dark)) (:foreground "OrangeRed" :bold t)) (t (:bold t))) "*The face used to highlight FAILED result strings." :group 'eshell-test) +;; backward-compatibility alias +(put 'eshell-test-failed-face 'face-alias 'eshell-test-failed) (defcustom eshell-show-usage-metrics nil "*If non-nil, display different usage metrics for each Eshell command." @@ -108,12 +112,10 @@ (if truth (progn (setq str " OK ") - (put-text-property 0 6 'face - 'eshell-test-ok-face str)) + (put-text-property 0 6 'face 'eshell-test-ok str)) (setq str "FAILED") (setq eshell-test-failures (1+ eshell-test-failures)) - (put-text-property 0 6 'face - 'eshell-test-failed-face str)) + (put-text-property 0 6 'face 'eshell-test-failed str)) str) "]") (add-text-properties (line-beginning-position) (point) (list 'test-func funcsym))