comparison lisp/custom/cus-face.el @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents bfd6434d15b3
children 489f57a838ef
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
2 ;; 2 ;;
3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4 ;; 4 ;;
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Keywords: help, faces 6 ;; Keywords: help, faces
7 ;; Version: 1.9954 7 ;; Version: 1.9956
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
9 9
10 ;;; Commentary: 10 ;;; Commentary:
11 ;; 11 ;;
12 ;; See `custom.el'. 12 ;; See `custom.el'.
84 (t 84 (t
85 (defalias 'custom-facep 'facep))) 85 (defalias 'custom-facep 'facep)))
86 86
87 (unless (fboundp 'make-empty-face) 87 (unless (fboundp 'make-empty-face)
88 ;; This should be moved to `faces.el'. 88 ;; This should be moved to `faces.el'.
89 (if (string-match "XEmacs" emacs-version) 89 (cond
90 ;; Give up for old XEmacs pre 19.15/20.1. 90 ((string-match "XEmacs" emacs-version)
91 (defalias 'make-empty-face 'make-face) 91 ;; Give up for old XEmacs pre 19.15/20.1.
92 ;; Define for Emacs pre 19.35. 92 (defalias 'make-empty-face 'make-face))
93 ((fboundp 'internal-find-face)
94 ;; We can do faces...
93 (defun make-empty-face (name) 95 (defun make-empty-face (name)
94 "Define a new FACE on all frames, ignoring X resources." 96 "Define a new FACE on all frames, ignoring X resources."
95 (interactive "SMake face: ") 97 (interactive "SMake face: ")
96 (or (internal-find-face name) 98 (or (internal-find-face name)
97 (let ((face (make-vector 8 nil))) 99 (let ((face (make-vector 8 nil)))
110 (setq global-face-data (cons (cons name face) global-face-data))) 112 (setq global-face-data (cons (cons name face) global-face-data)))
111 ;; add to menu 113 ;; add to menu
112 (if (fboundp 'facemenu-add-new-face) 114 (if (fboundp 'facemenu-add-new-face)
113 (facemenu-add-new-face name)) 115 (facemenu-add-new-face name))
114 face)) 116 face))
115 name))) 117 name))
118 (t
119 (fset 'make-empty-face 'ignore))))
116 120
117 (defcustom initialize-face-resources t 121 (defcustom initialize-face-resources t
118 "If non nil, allow X resources to initialize face properties. 122 "If non nil, allow X resources to initialize face properties.
119 This only affects faces declared with `defface', and only NT or X11 frames." 123 This only affects faces declared with `defface', and only NT or X11 frames."
120 :group 'customize 124 :group 'customize
268 :help-echo "\ 272 :help-echo "\
269 Control whether the text should be underlined.") 273 Control whether the text should be underlined.")
270 set-face-underline-p 274 set-face-underline-p
271 face-underline-p) 275 face-underline-p)
272 (:foreground (color :tag "Foreground" 276 (:foreground (color :tag "Foreground"
273 :value "black" 277 :value ""
274 :help-echo "Set foreground color.") 278 :help-echo "Set foreground color.")
275 set-face-foreground 279 set-face-foreground
276 custom-face-foreground) 280 custom-face-foreground)
277 (:background (color :tag "Background" 281 (:background (color :tag "Background"
278 :value "white" 282 :value ""
279 :help-echo "Set background color.") 283 :help-echo "Set background color.")
280 set-face-background 284 set-face-background
281 custom-face-background) 285 custom-face-background)
282 ;; (:invert (const :format "Invert Face\n" 286 ;; (:invert (const :format "Invert Face\n"
283 ;; :sibling-args (:help-echo " 287 ;; :sibling-args (:help-echo "