Mercurial > emacs
changeset 63193:0e93c53d878e
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364
Remove "-face" suffix from widget faces
2005-06-10 Miles Bader <miles@gnu.org>
* lisp/wid-edit.el (widget-documentation, widget-button)
(widget-field, widget-single-line-field, widget-inactive)
(widget-button-pressed): "-face" suffix removed from face names.
(widget-documentation-face, widget-button-face)
(widget-field-face, widget-single-line-field-face)
(widget-inactive-face, widget-button-pressed-face):
New backward-compatibility aliases for renamed faces.
(widget-documentation-face, widget-button-face)
(widget-button-pressed-face, widget-specify-field)
(widget-specify-inactive): Use renamed widget faces.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 10 Jun 2005 07:16:40 +0000 |
parents | 5f98613658a7 |
children | acd4cec2decf |
files | lisp/ChangeLog lisp/wid-edit.el |
diffstat | 2 files changed, 74 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jun 10 05:41:46 2005 +0000 +++ b/lisp/ChangeLog Fri Jun 10 07:16:40 2005 +0000 @@ -1,3 +1,16 @@ +2005-06-10 Miles Bader <miles@gnu.org> + + * wid-edit.el (widget-documentation, widget-button) + (widget-field, widget-single-line-field, widget-inactive) + (widget-button-pressed): "-face" suffix removed from face names. + (widget-documentation-face, widget-button-face) + (widget-field-face, widget-single-line-field-face) + (widget-inactive-face, widget-button-pressed-face): + New backward-compatibility aliases for renamed faces. + (widget-documentation-face, widget-button-face) + (widget-button-pressed-face, widget-specify-field) + (widget-specify-inactive): Use renamed widget faces. + 2005-06-10 Kenichi Handa <handa@m17n.org> * term/x-win.el (x-clipboard-yank): Remove condition-case
--- a/lisp/wid-edit.el Fri Jun 10 05:41:46 2005 +0000 +++ b/lisp/wid-edit.el Fri Jun 10 07:16:40 2005 +0000 @@ -89,28 +89,32 @@ :group 'widgets :group 'faces) -(defvar widget-documentation-face 'widget-documentation-face +(defvar widget-documentation-face 'widget-documentation "Face used for documentation strings in widgets. This exists as a variable so it can be set locally in certain buffers.") -(defface widget-documentation-face '((((class color) - (background dark)) - (:foreground "lime green")) - (((class color) - (background light)) - (:foreground "dark green")) - (t nil)) +(defface widget-documentation '((((class color) + (background dark)) + (:foreground "lime green")) + (((class color) + (background light)) + (:foreground "dark green")) + (t nil)) "Face used for documentation text." :group 'widget-documentation :group 'widget-faces) - -(defvar widget-button-face 'widget-button-face +;; backward compatibility alias +(put 'widget-documentation-face 'face-alias 'widget-documentation) + +(defvar widget-button-face 'widget-button "Face used for buttons in widgets. This exists as a variable so it can be set locally in certain buffers.") -(defface widget-button-face '((t (:weight bold))) +(defface widget-button '((t (:weight bold))) "Face used for widget buttons." :group 'widget-faces) +;; backward compatibility alias +(put 'widget-button-face 'face-alias 'widget-button) (defcustom widget-mouse-face 'highlight "Face used for widget buttons when the mouse is above them." @@ -120,33 +124,37 @@ ;; TTY gets special definitions here and in the next defface, because ;; the gray colors defined for other displays cause black text on a black ;; background, at least on light-background TTYs. -(defface widget-field-face '((((type tty)) - :background "yellow3" - :foreground "black") - (((class grayscale color) - (background light)) - :background "gray85") - (((class grayscale color) - (background dark)) - :background "dim gray") - (t - :slant italic)) +(defface widget-field '((((type tty)) + :background "yellow3" + :foreground "black") + (((class grayscale color) + (background light)) + :background "gray85") + (((class grayscale color) + (background dark)) + :background "dim gray") + (t + :slant italic)) "Face used for editable fields." :group 'widget-faces) - -(defface widget-single-line-field-face '((((type tty)) - :background "green3" - :foreground "black") - (((class grayscale color) - (background light)) - :background "gray85") - (((class grayscale color) - (background dark)) - :background "dim gray") - (t - :slant italic)) +;; backward-compatibility alias +(put 'widget-field-face 'face-alias 'widget-field) + +(defface widget-single-line-field '((((type tty)) + :background "green3" + :foreground "black") + (((class grayscale color) + (background light)) + :background "gray85") + (((class grayscale color) + (background dark)) + :background "dim gray") + (t + :slant italic)) "Face used for editable fields spanning only a single line." :group 'widget-faces) +;; backward-compatibility alias +(put 'widget-single-line-field-face 'face-alias 'widget-single-line-field) ;;; This causes display-table to be loaded, and not usefully. ;;;(defvar widget-single-line-display-table @@ -325,7 +333,7 @@ (insert-and-inherit " "))) (setq to (point))) (let ((keymap (widget-get widget :keymap)) - (face (or (widget-get widget :value-face) 'widget-field-face)) + (face (or (widget-get widget :value-face) 'widget-field)) (help-echo (widget-get widget :help-echo)) (follow-link (widget-get widget :follow-link)) (rear-sticky @@ -433,24 +441,26 @@ (prog1 (progn ,@form) (goto-char (point-max)))))) -(defface widget-inactive-face '((((class grayscale color) - (background dark)) - (:foreground "light gray")) - (((class grayscale color) - (background light)) - (:foreground "dim gray")) - (t - (:slant italic))) +(defface widget-inactive '((((class grayscale color) + (background dark)) + (:foreground "light gray")) + (((class grayscale color) + (background light)) + (:foreground "dim gray")) + (t + (:slant italic))) "Face used for inactive widgets." :group 'widget-faces) +;; backward-compatibility alias +(put 'widget-inactive-face 'face-alias 'widget-inactive) (defun widget-specify-inactive (widget from to) "Make WIDGET inactive for user modifications." (unless (widget-get widget :inactive) (let ((overlay (make-overlay from to nil t nil))) - (overlay-put overlay 'face 'widget-inactive-face) + (overlay-put overlay 'face 'widget-inactive) ;; This is disabled, as it makes the mouse cursor change shape. - ;; (overlay-put overlay 'mouse-face 'widget-inactive-face) + ;; (overlay-put overlay 'mouse-face 'widget-inactive) (overlay-put overlay 'evaporate t) (overlay-put overlay 'priority 100) (overlay-put overlay 'modification-hooks '(widget-overlay-inactive)) @@ -633,7 +643,7 @@ ;; Oh well. nil))) -(defvar widget-button-pressed-face 'widget-button-pressed-face +(defvar widget-button-pressed-face 'widget-button-pressed "Face used for pressed buttons in widgets. This exists as a variable so it can be set locally in certain buffers.") @@ -882,7 +892,7 @@ (call-interactively (lookup-key widget-global-map (this-command-keys)))))) -(defface widget-button-pressed-face +(defface widget-button-pressed '((((min-colors 88) (class color)) (:foreground "red1")) (((class color)) @@ -891,6 +901,8 @@ (:weight bold :underline t))) "Face used for pressed buttons." :group 'widget-faces) +;; backward-compatibility alias +(put 'widget-button-pressed-face 'face-alias 'widget-button-pressed) (defun widget-button-click (event) "Invoke the button that the mouse is pointing at." @@ -2953,7 +2965,7 @@ :match 'widget-regexp-match :validate 'widget-regexp-validate ;; Doesn't work well with terminating newline. - ;; :value-face 'widget-single-line-field-face + ;; :value-face 'widget-single-line-field :tag "Regexp") (defun widget-regexp-match (widget value) @@ -2979,7 +2991,7 @@ :prompt-value 'widget-file-prompt-value :format "%{%t%}: %v" ;; Doesn't work well with terminating newline. - ;; :value-face 'widget-single-line-field-face + ;; :value-face 'widget-single-line-field :tag "File") (defun widget-file-complete ()