aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorMiles Bader2005-06-10 07:16:58 +0000
committerMiles Bader2005-06-10 07:16:58 +0000
commitd478e69d60ec85cb5881bee646fd02bf7c9eb76f (patch)
treead912b68f46159c656c1e605376724d00a29aff4 /lisp/cus-edit.el
parent0efefc5296d1cdd0371b3faeafbccf382e5811c7 (diff)
downloademacs-d478e69d60ec85cb5881bee646fd02bf7c9eb76f.tar.gz
emacs-d478e69d60ec85cb5881bee646fd02bf7c9eb76f.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365
Remove "-face" suffix from custom faces 2005-06-10 Miles Bader <miles@gnu.org> * lisp/cus-edit.el (custom-invalid, custom-rogue, custom-modified) (custom-set, custom-changed, custom-saved, custom-button) (custom-button-pressed, custom-documentation, custom-state) (custom-comment, custom-comment-tag, custom-variable-tag) (custom-variable-button, custom-face-tag, custom-group-tag-1) (custom-group-tag): Remove "-face" suffix from face names. (custom-magic-alist, custom-magic-value-create) (custom-group-sample-face-get, custom-mode): Use renamed custom faces. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): New backward-compatibility aliases for renamed faces.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el170
1 files changed, 101 insertions, 69 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 82a5e887bed..6f5afa9bacd 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1636,50 +1636,62 @@ item in another window.\n\n"))
1636 :group 'custom-faces 1636 :group 'custom-faces
1637 :group 'custom-buffer) 1637 :group 'custom-buffer)
1638 1638
1639(defface custom-invalid-face '((((class color)) 1639(defface custom-invalid '((((class color))
1640 (:foreground "yellow1" :background "red1")) 1640 (:foreground "yellow1" :background "red1"))
1641 (t 1641 (t
1642 (:weight bold :slant italic :underline t))) 1642 (:weight bold :slant italic :underline t)))
1643 "Face used when the customize item is invalid." 1643 "Face used when the customize item is invalid."
1644 :group 'custom-magic-faces) 1644 :group 'custom-magic-faces)
1645;; backward-compatibility alias
1646(put 'custom-invalid-face 'face-alias 'custom-invalid)
1645 1647
1646(defface custom-rogue-face '((((class color)) 1648(defface custom-rogue '((((class color))
1647 (:foreground "pink" :background "black")) 1649 (:foreground "pink" :background "black"))
1648 (t 1650 (t
1649 (:underline t))) 1651 (:underline t)))
1650 "Face used when the customize item is not defined for customization." 1652 "Face used when the customize item is not defined for customization."
1651 :group 'custom-magic-faces) 1653 :group 'custom-magic-faces)
1654;; backward-compatibility alias
1655(put 'custom-rogue-face 'face-alias 'custom-rogue)
1652 1656
1653(defface custom-modified-face '((((min-colors 88) (class color)) 1657(defface custom-modified '((((min-colors 88) (class color))
1654 (:foreground "white" :background "blue1")) 1658 (:foreground "white" :background "blue1"))
1655 (((class color))
1656 (:foreground "white" :background "blue"))
1657 (t
1658 (:slant italic :bold)))
1659 "Face used when the customize item has been modified."
1660 :group 'custom-magic-faces)
1661
1662(defface custom-set-face '((((min-colors 88) (class color))
1663 (:foreground "blue1" :background "white"))
1664 (((class color)) 1659 (((class color))
1665 (:foreground "blue" :background "white")) 1660 (:foreground "white" :background "blue"))
1666 (t 1661 (t
1667 (:slant italic))) 1662 (:slant italic :bold)))
1663 "Face used when the customize item has been modified."
1664 :group 'custom-magic-faces)
1665;; backward-compatibility alias
1666(put 'custom-modified-face 'face-alias 'custom-modified)
1667
1668(defface custom-set '((((min-colors 88) (class color))
1669 (:foreground "blue1" :background "white"))
1670 (((class color))
1671 (:foreground "blue" :background "white"))
1672 (t
1673 (:slant italic)))
1668 "Face used when the customize item has been set." 1674 "Face used when the customize item has been set."
1669 :group 'custom-magic-faces) 1675 :group 'custom-magic-faces)
1670 1676;; backward-compatibility alias
1671(defface custom-changed-face '((((min-colors 88) (class color)) 1677(put 'custom-set-face 'face-alias 'custom-set)
1672 (:foreground "white" :background "blue1")) 1678
1673 (((class color)) 1679(defface custom-changed '((((min-colors 88) (class color))
1674 (:foreground "white" :background "blue")) 1680 (:foreground "white" :background "blue1"))
1675 (t 1681 (((class color))
1676 (:slant italic))) 1682 (:foreground "white" :background "blue"))
1683 (t
1684 (:slant italic)))
1677 "Face used when the customize item has been changed." 1685 "Face used when the customize item has been changed."
1678 :group 'custom-magic-faces) 1686 :group 'custom-magic-faces)
1687;; backward-compatibility alias
1688(put 'custom-changed-face 'face-alias 'custom-changed)
1679 1689
1680(defface custom-saved-face '((t (:underline t))) 1690(defface custom-saved '((t (:underline t)))
1681 "Face used when the customize item has been saved." 1691 "Face used when the customize item has been saved."
1682 :group 'custom-magic-faces) 1692 :group 'custom-magic-faces)
1693;; backward-compatibility alias
1694(put 'custom-saved-face 'face-alias 'custom-saved)
1683 1695
1684(defconst custom-magic-alist 1696(defconst custom-magic-alist
1685 '((nil "#" underline "\ 1697 '((nil "#" underline "\
@@ -1689,21 +1701,21 @@ UNKNOWN, you should not see this.")
1689 (hidden "-" default "\ 1701 (hidden "-" default "\
1690HIDDEN, invoke \"Show\" in the previous line to show." "\ 1702HIDDEN, invoke \"Show\" in the previous line to show." "\
1691group now hidden, invoke \"Show\", above, to show contents.") 1703group now hidden, invoke \"Show\", above, to show contents.")
1692 (invalid "x" custom-invalid-face "\ 1704 (invalid "x" custom-invalid "\
1693INVALID, the displayed value cannot be set.") 1705INVALID, the displayed value cannot be set.")
1694 (modified "*" custom-modified-face "\ 1706 (modified "*" custom-modified "\
1695EDITED, shown value does not take effect until you set or save it." "\ 1707EDITED, shown value does not take effect until you set or save it." "\
1696something in this group has been edited but not set.") 1708something in this group has been edited but not set.")
1697 (set "+" custom-set-face "\ 1709 (set "+" custom-set "\
1698SET for current session only." "\ 1710SET for current session only." "\
1699something in this group has been set but not saved.") 1711something in this group has been set but not saved.")
1700 (changed ":" custom-changed-face "\ 1712 (changed ":" custom-changed "\
1701CHANGED outside Customize; operating on it here may be unreliable." "\ 1713CHANGED outside Customize; operating on it here may be unreliable." "\
1702something in this group has been changed outside customize.") 1714something in this group has been changed outside customize.")
1703 (saved "!" custom-saved-face "\ 1715 (saved "!" custom-saved "\
1704SAVED and set." "\ 1716SAVED and set." "\
1705something in this group has been set and saved.") 1717something in this group has been set and saved.")
1706 (rogue "@" custom-rogue-face "\ 1718 (rogue "@" custom-rogue "\
1707NO CUSTOMIZATION DATA; you should not see this." "\ 1719NO CUSTOMIZATION DATA; you should not see this." "\
1708something in this group is not prepared for customization.") 1720something in this group is not prepared for customization.")
1709 (standard " " nil "\ 1721 (standard " " nil "\
@@ -1830,7 +1842,7 @@ and `face'."
1830 (insert " (lisp)")) 1842 (insert " (lisp)"))
1831 ((eq form 'mismatch) 1843 ((eq form 'mismatch)
1832 (insert " (mismatch)"))) 1844 (insert " (mismatch)")))
1833 (put-text-property start (point) 'face 'custom-state-face)) 1845 (put-text-property start (point) 'face 'custom-state))
1834 (insert "\n")) 1846 (insert "\n"))
1835 (when (and (eq category 'group) 1847 (when (and (eq category 'group)
1836 (not (and (eq custom-buffer-style 'links) 1848 (not (and (eq custom-buffer-style 'links)
@@ -1864,7 +1876,7 @@ and `face'."
1864 1876
1865;;; The `custom' Widget. 1877;;; The `custom' Widget.
1866 1878
1867(defface custom-button-face 1879(defface custom-button
1868 '((((type x w32 mac) (class color)) ; Like default modeline 1880 '((((type x w32 mac) (class color)) ; Like default modeline
1869 (:box (:line-width 2 :style released-button) 1881 (:box (:line-width 2 :style released-button)
1870 :background "lightgrey" :foreground "black")) 1882 :background "lightgrey" :foreground "black"))
@@ -1873,8 +1885,10 @@ and `face'."
1873 "Face used for buttons in customization buffers." 1885 "Face used for buttons in customization buffers."
1874 :version "21.1" 1886 :version "21.1"
1875 :group 'custom-faces) 1887 :group 'custom-faces)
1888;; backward-compatibility alias
1889(put 'custom-button-face 'face-alias 'custom-button)
1876 1890
1877(defface custom-button-pressed-face 1891(defface custom-button-pressed
1878 '((((type x w32 mac) (class color)) 1892 '((((type x w32 mac) (class color))
1879 (:box (:line-width 2 :style pressed-button) 1893 (:box (:line-width 2 :style pressed-button)
1880 :background "lightgrey" :foreground "black")) 1894 :background "lightgrey" :foreground "black"))
@@ -1883,20 +1897,26 @@ and `face'."
1883 "Face used for buttons in customization buffers." 1897 "Face used for buttons in customization buffers."
1884 :version "21.1" 1898 :version "21.1"
1885 :group 'custom-faces) 1899 :group 'custom-faces)
1900;; backward-compatibility alias
1901(put 'custom-button-pressed-face 'face-alias 'custom-button-pressed)
1886 1902
1887(defface custom-documentation-face nil 1903(defface custom-documentation nil
1888 "Face used for documentation strings in customization buffers." 1904 "Face used for documentation strings in customization buffers."
1889 :group 'custom-faces) 1905 :group 'custom-faces)
1890 1906;; backward-compatibility alias
1891(defface custom-state-face '((((class color) 1907(put 'custom-documentation-face 'face-alias 'custom-documentation)
1892 (background dark)) 1908
1893 (:foreground "lime green")) 1909(defface custom-state '((((class color)
1894 (((class color) 1910 (background dark))
1895 (background light)) 1911 (:foreground "lime green"))
1896 (:foreground "dark green")) 1912 (((class color)
1897 (t nil)) 1913 (background light))
1914 (:foreground "dark green"))
1915 (t nil))
1898 "Face used for State descriptions in the customize buffer." 1916 "Face used for State descriptions in the customize buffer."
1899 :group 'custom-faces) 1917 :group 'custom-faces)
1918;; backward-compatibility alias
1919(put 'custom-state-face 'face-alias 'custom-state)
1900 1920
1901(define-widget 'custom 'default 1921(define-widget 'custom 'default
1902 "Customize a user option." 1922 "Customize a user option."
@@ -2092,20 +2112,22 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
2092;;; The `custom-comment' Widget. 2112;;; The `custom-comment' Widget.
2093 2113
2094;; like the editable field 2114;; like the editable field
2095(defface custom-comment-face '((((class grayscale color) 2115(defface custom-comment '((((class grayscale color)
2096 (background light)) 2116 (background light))
2097 (:background "gray85")) 2117 (:background "gray85"))
2098 (((class grayscale color) 2118 (((class grayscale color)
2099 (background dark)) 2119 (background dark))
2100 (:background "dim gray")) 2120 (:background "dim gray"))
2101 (t 2121 (t
2102 (:slant italic))) 2122 (:slant italic)))
2103 "Face used for comments on variables or faces" 2123 "Face used for comments on variables or faces"
2104 :version "21.1" 2124 :version "21.1"
2105 :group 'custom-faces) 2125 :group 'custom-faces)
2126;; backward-compatibility alias
2127(put 'custom-comment-face 'face-alias 'custom-comment)
2106 2128
2107;; like font-lock-comment-face 2129;; like font-lock-comment-face
2108(defface custom-comment-tag-face 2130(defface custom-comment-tag
2109 '((((class color) (background dark)) (:foreground "gray80")) 2131 '((((class color) (background dark)) (:foreground "gray80"))
2110 (((class color) (background light)) (:foreground "blue4")) 2132 (((class color) (background light)) (:foreground "blue4"))
2111 (((class grayscale) (background light)) 2133 (((class grayscale) (background light))
@@ -2115,6 +2137,8 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
2115 (t (:weight bold))) 2137 (t (:weight bold)))
2116 "Face used for variables or faces comment tags" 2138 "Face used for variables or faces comment tags"
2117 :group 'custom-faces) 2139 :group 'custom-faces)
2140;; backward-compatibility alias
2141(put 'custom-comment-tag-face 'face-alias 'custom-comment-tag)
2118 2142
2119(define-widget 'custom-comment 'string 2143(define-widget 'custom-comment 'string
2120 "User comment." 2144 "User comment."
@@ -2154,7 +2178,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
2154 2178
2155;; When this was underlined blue, users confused it with a 2179;; When this was underlined blue, users confused it with a
2156;; Mosaic-style hyperlink... 2180;; Mosaic-style hyperlink...
2157(defface custom-variable-tag-face 2181(defface custom-variable-tag
2158 `((((class color) 2182 `((((class color)
2159 (background dark)) 2183 (background dark))
2160 (:foreground "light blue" :weight bold :height 1.2 :inherit variable-pitch)) 2184 (:foreground "light blue" :weight bold :height 1.2 :inherit variable-pitch))
@@ -2167,10 +2191,14 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
2167 (t (:weight bold))) 2191 (t (:weight bold)))
2168 "Face used for unpushable variable tags." 2192 "Face used for unpushable variable tags."
2169 :group 'custom-faces) 2193 :group 'custom-faces)
2194;; backward-compatibility alias
2195(put 'custom-variable-tag-face 'face-alias 'custom-variable-tag)
2170 2196
2171(defface custom-variable-button-face '((t (:underline t :weight bold))) 2197(defface custom-variable-button '((t (:underline t :weight bold)))
2172 "Face used for pushable variable tags." 2198 "Face used for pushable variable tags."
2173 :group 'custom-faces) 2199 :group 'custom-faces)
2200;; backward-compatibility alias
2201(put 'custom-variable-button-face 'face-alias 'custom-variable-button)
2174 2202
2175(defcustom custom-variable-default-form 'edit 2203(defcustom custom-variable-default-form 'edit
2176 "Default form of displaying variable values." 2204 "Default form of displaying variable values."
@@ -2874,10 +2902,12 @@ Only match frames that support the specified face attributes.")
2874 2902
2875;;; The `custom-face' Widget. 2903;;; The `custom-face' Widget.
2876 2904
2877(defface custom-face-tag-face 2905(defface custom-face-tag
2878 `((t (:weight bold :height 1.2 :inherit variable-pitch))) 2906 `((t (:weight bold :height 1.2 :inherit variable-pitch)))
2879 "Face used for face tags." 2907 "Face used for face tags."
2880 :group 'custom-faces) 2908 :group 'custom-faces)
2909;; backward-compatibility alias
2910(put 'custom-face-tag-face 'face-alias 'custom-face-tag)
2881 2911
2882(defcustom custom-face-default-form 'selected 2912(defcustom custom-face-default-form 'selected
2883 "Default form of displaying face definition." 2913 "Default form of displaying face definition."
@@ -3396,12 +3426,11 @@ restoring it to the state of a face that has never been customized."
3396 ;; Fixme: make it do so in Emacs. 3426 ;; Fixme: make it do so in Emacs.
3397 "Face used for group tags. 3427 "Face used for group tags.
3398The first member is used for level 1 groups, the second for level 2, 3428The first member is used for level 1 groups, the second for level 2,
3399and so forth. The remaining group tags are shown with 3429and so forth. The remaining group tags are shown with `custom-group-tag'."
3400`custom-group-tag-face'."
3401 :type '(repeat face) 3430 :type '(repeat face)
3402 :group 'custom-faces) 3431 :group 'custom-faces)
3403 3432
3404(defface custom-group-tag-face-1 3433(defface custom-group-tag-1
3405 `((((class color) 3434 `((((class color)
3406 (background dark)) 3435 (background dark))
3407 (:foreground "pink" :weight bold :height 1.2 :inherit variable-pitch)) 3436 (:foreground "pink" :weight bold :height 1.2 :inherit variable-pitch))
@@ -3414,8 +3443,10 @@ and so forth. The remaining group tags are shown with
3414 (t (:weight bold))) 3443 (t (:weight bold)))
3415 "Face used for group tags." 3444 "Face used for group tags."
3416 :group 'custom-faces) 3445 :group 'custom-faces)
3446;; backward-compatibility alias
3447(put 'custom-group-tag-face-1 'face-alias 'custom-group-tag-1)
3417 3448
3418(defface custom-group-tag-face 3449(defface custom-group-tag
3419 `((((class color) 3450 `((((class color)
3420 (background dark)) 3451 (background dark))
3421 (:foreground "light blue" :weight bold :height 1.2)) 3452 (:foreground "light blue" :weight bold :height 1.2))
@@ -3428,6 +3459,8 @@ and so forth. The remaining group tags are shown with
3428 (t (:weight bold))) 3459 (t (:weight bold)))
3429 "Face used for low level group tags." 3460 "Face used for low level group tags."
3430 :group 'custom-faces) 3461 :group 'custom-faces)
3462;; backward-compatibility alias
3463(put 'custom-group-tag-face 'face-alias 'custom-group-tag)
3431 3464
3432(define-widget 'custom-group 'custom 3465(define-widget 'custom-group 'custom
3433 "Customize group." 3466 "Customize group."
@@ -3448,7 +3481,7 @@ and so forth. The remaining group tags are shown with
3448(defun custom-group-sample-face-get (widget) 3481(defun custom-group-sample-face-get (widget)
3449 ;; Use :sample-face. 3482 ;; Use :sample-face.
3450 (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces) 3483 (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces)
3451 'custom-group-tag-face)) 3484 'custom-group-tag))
3452 3485
3453(define-widget 'custom-group-visibility 'visibility 3486(define-widget 'custom-group-visibility 'visibility
3454 "An indicator and manipulator for hidden group contents." 3487 "An indicator and manipulator for hidden group contents."
@@ -4261,13 +4294,12 @@ if that value is non-nil."
4261 (make-local-variable 'custom-options) 4294 (make-local-variable 'custom-options)
4262 (make-local-variable 'custom-local-buffer) 4295 (make-local-variable 'custom-local-buffer)
4263 (make-local-variable 'widget-documentation-face) 4296 (make-local-variable 'widget-documentation-face)
4264 (setq widget-documentation-face 'custom-documentation-face) 4297 (setq widget-documentation-face 'custom-documentation)
4265 (make-local-variable 'widget-button-face) 4298 (make-local-variable 'widget-button-face)
4266 (setq widget-button-face 'custom-button-face) 4299 (setq widget-button-face 'custom-button)
4267 (set (make-local-variable 'widget-button-pressed-face) 4300 (set (make-local-variable 'widget-button-pressed-face) 'custom-button-pressed)
4268 'custom-button-pressed-face)
4269 (set (make-local-variable 'widget-mouse-face) 4301 (set (make-local-variable 'widget-mouse-face)
4270 'custom-button-pressed-face) ; buttons `depress' when moused 4302 'custom-button-pressed) ; buttons `depress' when moused
4271 ;; When possible, use relief for buttons, not bracketing. This test 4303 ;; When possible, use relief for buttons, not bracketing. This test
4272 ;; may not be optimal. 4304 ;; may not be optimal.
4273 (when custom-raised-buttons 4305 (when custom-raised-buttons