[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/wid-edit.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/wid-edit.el |
Date: |
Fri, 10 Jun 2005 03:16:41 -0400 |
Index: emacs/lisp/wid-edit.el
diff -c emacs/lisp/wid-edit.el:1.138 emacs/lisp/wid-edit.el:1.139
*** emacs/lisp/wid-edit.el:1.138 Fri Apr 8 14:26:13 2005
--- emacs/lisp/wid-edit.el Fri Jun 10 07:16:40 2005
***************
*** 89,116 ****
:group 'widgets
:group 'faces)
! (defvar widget-documentation-face 'widget-documentation-face
"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))
"Face used for documentation text."
:group 'widget-documentation
:group 'widget-faces)
! (defvar widget-button-face 'widget-button-face
"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)))
"Face used for widget buttons."
:group 'widget-faces)
(defcustom widget-mouse-face 'highlight
"Face used for widget buttons when the mouse is above them."
--- 89,120 ----
:group 'widgets
:group 'faces)
! (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 '((((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)
+ ;; 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 '((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,152 ****
;; 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))
"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))
"Face used for editable fields spanning only a single line."
:group 'widget-faces)
;;; This causes display-table to be loaded, and not usefully.
;;;(defvar widget-single-line-display-table
--- 124,160 ----
;; 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 '((((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)
+ ;; 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,331 ****
(insert-and-inherit " ")))
(setq to (point)))
(let ((keymap (widget-get widget :keymap))
! (face (or (widget-get widget :value-face) 'widget-field-face))
(help-echo (widget-get widget :help-echo))
(follow-link (widget-get widget :follow-link))
(rear-sticky
--- 333,339 ----
(insert-and-inherit " ")))
(setq to (point)))
(let ((keymap (widget-get widget :keymap))
! (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,456 ****
(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)))
"Face used for inactive widgets."
:group 'widget-faces)
(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)
;; This is disabled, as it makes the mouse cursor change shape.
! ;; (overlay-put overlay 'mouse-face 'widget-inactive-face)
(overlay-put overlay 'evaporate t)
(overlay-put overlay 'priority 100)
(overlay-put overlay 'modification-hooks '(widget-overlay-inactive))
--- 441,466 ----
(prog1 (progn ,@form)
(goto-char (point-max))))))
! (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)
;; This is disabled, as it makes the mouse cursor change shape.
! ;; (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,639 ****
;; Oh well.
nil)))
! (defvar widget-button-pressed-face 'widget-button-pressed-face
"Face used for pressed buttons in widgets.
This exists as a variable so it can be set locally in certain
buffers.")
--- 643,649 ----
;; Oh well.
nil)))
! (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,888 ****
(call-interactively
(lookup-key widget-global-map (this-command-keys))))))
! (defface widget-button-pressed-face
'((((min-colors 88) (class color))
(:foreground "red1"))
(((class color))
--- 892,898 ----
(call-interactively
(lookup-key widget-global-map (this-command-keys))))))
! (defface widget-button-pressed
'((((min-colors 88) (class color))
(:foreground "red1"))
(((class color))
***************
*** 891,896 ****
--- 901,908 ----
(: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,2959 ****
:match 'widget-regexp-match
:validate 'widget-regexp-validate
;; Doesn't work well with terminating newline.
! ;; :value-face 'widget-single-line-field-face
:tag "Regexp")
(defun widget-regexp-match (widget value)
--- 2965,2971 ----
:match 'widget-regexp-match
:validate 'widget-regexp-validate
;; Doesn't work well with terminating newline.
! ;; :value-face 'widget-single-line-field
:tag "Regexp")
(defun widget-regexp-match (widget value)
***************
*** 2979,2985 ****
:prompt-value 'widget-file-prompt-value
:format "%{%t%}: %v"
;; Doesn't work well with terminating newline.
! ;; :value-face 'widget-single-line-field-face
:tag "File")
(defun widget-file-complete ()
--- 2991,2997 ----
:prompt-value 'widget-file-prompt-value
:format "%{%t%}: %v"
;; Doesn't work well with terminating newline.
! ;; :value-face 'widget-single-line-field
:tag "File")
(defun widget-file-complete ()
- [Emacs-diffs] Changes to emacs/lisp/wid-edit.el,
Miles Bader <=