;;; faces.el --- Lisp faces
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
(defun read-face-name (prompt &optional string-describing-default multiple)
"Read a face, defaulting to the face or faces on the char after point.
-If it has a `read-face-name' property, that overrides the `face' property.
-PROMPT describes what you will do with the face (don't end in a space).
-STRING-DESCRIBING-DEFAULT describes what default you will use
-if this function returns nil.
+If it has the property `read-face-name', that overrides the `face' property.
+PROMPT should be a string that describes what the caller will do with the face;
+it should not end in a space.
+STRING-DESCRIBING-DEFAULT should describe what default the caller will use if
+the user just types RET; you can omit it.
If MULTIPLE is non-nil, return a list of faces (possibly only one).
Otherwise, return a single face."
(let ((faceprop (or (get-char-property (point) 'read-face-name)
"Return a list of colors supported for a particular frame.
The argument FRAME specifies which frame to try.
The value may be different for frames on different display types.
-If FRAME doesn't support colors, the value is nil."
+If FRAME doesn't support colors, the value is nil.
+If FRAME is nil, that stands for the selected frame."
(if (memq (framep (or frame (selected-frame))) '(x w32 mac))
(xw-defined-colors frame)
(mapcar 'car (tty-color-alist frame))))
(defcustom frame-background-mode nil
"*The brightness of the background.
Set this to the symbol `dark' if your background color is dark,
-`light' if your background is light, or nil (default) if you want Emacs
-to examine the brightness for you. Don't set this variable with `setq';
-this won't have the expected effect."
+`light' if your background is light, or nil (automatic by default)
+if you want Emacs to examine the brightness for you. Don't set this
+variable with `setq'; this won't have the expected effect."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
(mapc 'frame-set-background-mode (frame-list)))
:initialize 'custom-initialize-changed
- :type '(choice (choice-item dark)
- (choice-item light)
- (choice-item :tag "default" nil)))
+ :type '(choice (const dark)
+ (const light)
+ (const :tag "automatic" nil)))
(defvar default-frame-background-mode nil
"Internal variable for the default brightness of the background.
:group 'basic-faces
:version "22.1")
+(defface link
+ '((((class color) (min-colors 88) (background light))
+ :foreground "blue1" :underline t)
+ (((class color) (background light))
+ :foreground "blue" :underline t)
+ (((class color) (min-colors 88) (background dark))
+ :foreground "cyan1" :underline t)
+ (((class color) (background dark))
+ :foreground "cyan" :underline t)
+ (t :inherit underline))
+ "Basic face for unvisited links."
+ :group 'basic-faces
+ :version "22.1")
+
+(defface link-visited
+ '((default :inherit link)
+ (((class color) (background light)) :foreground "magenta4")
+ (((class color) (background dark)) :foreground "violet"))
+ "Basic face for visited links."
+ :group 'basic-faces
+ :version "22.1")
+
(defface highlight
'((((class color) (min-colors 88) (background light))
:background "darkseagreen2")
"Basic face for highlighting."
:group 'basic-faces)
-(defface mode-line-highlight
- '((((class color) (min-colors 88))
- :box (:line-width 2 :color "grey40" :style released-button))
- (t
- :inherit highlight))
- "Basic mode line face for highlighting."
- :version "22.1"
- :group 'modeline
- :group 'basic-faces)
-
(defface region
'((((class color) (min-colors 88) (background dark))
:background "blue3")
(t :inverse-video t))
"Basic face for highlighting trailing whitespace."
:version "21.1"
- :group 'whitespace ; like `show-trailing-whitespace'
+ :group 'whitespace-faces ; like `show-trailing-whitespace'
:group 'basic-faces)
(defface escape-glyph
;; red4 is too dark, but some say blue is too loud.
;; brown seems to work ok. -- rms.
(t :foreground "brown"))
- "Face for characters displayed as ^-sequences or \-sequences."
+ "Face for characters displayed as sequences using `^' or `\\'."
:group 'basic-faces
:version "22.1")
:group 'basic-faces
:version "22.1")
+(defgroup mode-line-faces nil
+ "Faces used in the mode line."
+ :group 'modeline
+ :group 'faces
+ :version "22.1")
+
(defface mode-line
'((((class color) (min-colors 88))
:box (:line-width -1 :style released-button)
:inverse-video t))
"Basic mode line face for selected window."
:version "21.1"
- :group 'modeline
+ :group 'mode-line-faces
:group 'basic-faces)
(defface mode-line-inactive
:foreground "grey80" :background "grey30"))
"Basic mode line face for non-selected windows."
:version "22.1"
- :group 'modeline
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
+(defface mode-line-highlight
+ '((((class color) (min-colors 88))
+ :box (:line-width 2 :color "grey40" :style released-button))
+ (t
+ :inherit highlight))
+ "Basic mode line face for highlighting."
+ :version "22.1"
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
+(defface mode-line-buffer-id
+ '((t (:weight bold)))
+ "Face used for buffer identification parts of the mode line."
+ :version "22.1"
+ :group 'mode-line-faces
:group 'basic-faces)
;; Make `modeline' an alias for `mode-line', for compatibility.
(put 'modeline 'face-alias 'mode-line)
(put 'modeline-inactive 'face-alias 'mode-line-inactive)
(put 'modeline-highlight 'face-alias 'mode-line-highlight)
+(put 'modeline-buffer-id 'face-alias 'mode-line-buffer-id)
(defface header-line
'((default
'((((type tty)) :inherit mode-line-inactive))
"Face used for vertical window dividers on ttys."
:version "22.1"
- :group 'modeline
:group 'basic-faces)
(defface minibuffer-prompt
:group 'frames
:group 'basic-faces)
-(defface scroll-bar '()
+(defface scroll-bar '((t nil))
"Basic face for the scroll bar colors under X."
:version "21.1"
:group 'frames
:group 'basic-faces)
-(defface border '()
+(defface border '((t nil))
"Basic face for the frame border under X."
:version "21.1"
:group 'frames
:group 'basic-faces)
-(defface cursor '()
+(defface cursor '((t nil))
"Basic face for the cursor color under X.
Note: Other faces cannot inherit from the cursor face."
:version "21.1"
(put 'cursor 'face-no-inherit t)
-(defface mouse '()
+(defface mouse '((t nil))
"Basic face for the mouse color under X."
:version "21.1"
:group 'mouse