• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:color +defs:name

122   "Define a new face with name FACE, a symbol.
142 "Define a new, empty face with name FACE.
149 "Define a face just like OLD-FACE, with name NEW-FACE.
184 (defun internal-find-face (name &optional frame)
189 (facep name))
193 (defun internal-get-face (name &optional frame)
197 (or (facep name)
198 (check-face name)))
208 "Return non-nil if FACE is a face name or internal face object.
209 Return nil otherwise. A face name can be a string or a symbol.
216 "Signal an error if FACE doesn't name a face.
228 "Return the internal ID of face with name FACE.
230 of a face name is the same for all frames."
301 the name of a face attribute, and each ENTRY is a cons of the form
313 (let* ((face-name (face-name face))
314 (value (internal-face-x-get-resource (concat face-name resource)
322 face-name frame attribute value))))
351 (defun face-name (face)
352 "Return the name of face FACE."
353 (symbol-name (check-face face)))
420 "Return the foreground color name of FACE, or nil if unspecified.
425 If INHERIT is nil, only a foreground color directly defined by FACE is
427 If INHERIT is t, and FACE doesn't define a foreground color, then any
428 foreground color that FACE inherits through its `:inherit' attribute
431 resolve an unspecified foreground color.
433 To ensure that a valid color is always returned, use a value of
440 "Return the background color name of FACE, or nil if unspecified.
445 If INHERIT is nil, only a background color directly defined by FACE is
447 If INHERIT is t, and FACE doesn't define a background color, then any
448 background color that FACE inherits through its `:inherit' attribute
451 resolve an unspecified background color.
453 To ensure that a valid color is always returned, use a value of
460 "Return the stipple pixmap name of FACE, or nil if unspecified.
567 face attribute name. All attributes can be set to `unspecified';
575 or a fontset alias name. If a font family is specified, wild-cards `*'
606 VALUE must be a color name, a string.
611 VALUE is t, underline with foreground color of the face. If VALUE is
612 a string, underline with that color. If VALUE is nil, explicitly
618 VALUE is t, overline with foreground color of the face. If VALUE is a
619 string, overline with that color. If VALUE is nil, explicitly don't
625 striking through them. If VALUE is t, use the foreground color of the
626 face. If VALUE is a string, strike-through with that color. If VALUE
633 VALUE is t, draw a box with lines of width 1 in the foreground color
634 of the face. If VALUE is a string, the string must be a color name,
635 and the box is drawn in that color with a line width of 1. Otherwise,
637 :color COLOR :style STYLE)'. If a keyword/value pair is missing from
642 not around it. COLOR is the name of the color to draw in, default is
643 the foreground color of the face for simple boxes, and the background
644 color of the face for 3D boxes. STYLE specifies whether a 3D box
658 If VALUE is a string, it must be the name of a file of pixmap data.
666 and `:slant' may also be set in one step from an X font name:
671 XLFD font name. If it is a font name pattern, the first matching font
680 VALUE is the name of a face from which to inherit attributes, or a list
703 (interactive (list (read-face-name "Make which face bold")))
711 (interactive (list (read-face-name "Make which face non-bold")))
720 (interactive (list (read-face-name "Make which face italic")))
728 (interactive (list (read-face-name "Make which face non-italic")))
737 (interactive (list (read-face-name "Make which face bold-italic")))
754 (defun set-face-background (face color &optional frame)
755 "Change the background color of face FACE to COLOR (a string).
757 COLOR can be a system-defined color name (see `list-colors-display')
759 When called interactively, prompts for the face and color."
761 (set-face-attribute face frame :background (or color 'unspecified)))
764 (defun set-face-foreground (face color &optional frame)
765 "Change the foreground color of face FACE to COLOR (a string).
767 COLOR can be a system-defined color name (see `list-colors-display')
769 When called interactively, prompts for the face and color."
771 (set-face-attribute face frame :foreground (or color 'unspecified)))
777 STIPPLE should be a string, the name of a file of pixmap data.
791 with the same of the foreground color.
792 If UNDERLINE is a string, underline with the color named UNDERLINE.
844 If FACE specifies neither foreground nor background color,
847 (interactive (list (read-face-name "Invert face")))
865 (defun read-face-name (prompt &optional string-describing-default multiple)
867 If it has the property `read-face-name', that overrides the `face' property.
874 (let ((faceprop (or (get-char-property (point) 'read-face-name)
879 ;; Try to get a face name from the buffer.
886 (not (memq (car faceprop) '(foreground-color background-color))))
898 (push (symbol-name s) aliasfaces)
899 (push (symbol-name s) nonaliasfaces)))))
912 (if faces (mapconcat 'symbol-name faces ",")
917 (if faces (mapconcat 'symbol-name faces ","))))
949 (mapcar #'(lambda (x) (cons (symbol-name x) x))
953 (nconc (mapcar #'(lambda (x) (cons (symbol-name x) x))
957 (mapcar #'(lambda (x) (cons (symbol-name x) x))
975 (mapcar #'(lambda (c) (cons (symbol-name c) c))
984 (defvar face-attribute-name-alist
995 (:foreground . "foreground color")
996 (:background . "background color")
1001 ATTRIBUTE-NAME is a face attribute name (a keyword symbol), and
1002 DESCRIPTION is a descriptive name for ATTRIBUTE-NAME.")
1005 (defun face-descriptive-attribute-name (attribute)
1006 "Return a descriptive name for ATTRIBUTE."
1007 (cdr (assq attribute face-attribute-name-alist)))
1010 (defun face-read-string (face default name &optional completion-alist)
1014 descriptive name of the attribute for prompting. COMPLETION-ALIST is an
1021 (setq name (concat (upcase (substring name 0 1)) (substring name 1)))
1026 name face default)
1027 (format "%s for face `%s': " name face))
1032 (defun face-read-integer (face default name)
1036 name of the attribute for prompting. Value is the new attribute value."
1040 name
1055 (attribute-name (face-descriptive-attribute-name attribute))
1060 ;; a list `(:width WIDTH :color COLOR)' or `(:width WIDTH :shadow
1072 (face-read-string face default attribute-name valid))
1075 ;; below. In particular, this avoids a non-tty color
1080 ;; explicitly in VALID, using color approximation code
1087 (setq new-value (car (tty-color-desc new-value frame))))
1091 (setq new-value (face-read-integer face old-value attribute-name)))
1095 ;; pixmap file name won't start with an open-paren.
1105 "Read the name of a font for FACE on FRAME.
1117 (dolist (attribute face-attribute-name-alist result)
1140 (setq face (read-face-name "Modify face"))
1145 "Read face name and face attribute value.
1152 (face (read-face-name prompt))
1156 (let* ((attribute-name (face-descriptive-attribute-name attribute))
1157 (prompt (format "Set %s of face" attribute-name))
1158 (face (read-face-name prompt))
1174 ;; The name list-faces would be more consistent, but let's avoid a
1175 ;; conflict with Lucid, which uses that name differently.
1192 disp-frame window face-name)
1197 (let ((s (symbol-name f)))
1215 "\\[help-follow] on a face name to customize it\n"
1219 (setq face-name (symbol-name face))
1220 (insert (format line-format face-name))
1225 (search-backward face-name)
1240 (put-text-property line-beg (1- (point)) 'read-face-name face)
1270 (interactive (list (read-face-name "Describe face" "= `default' face" t)))
1297 (insert "Face: " (symbol-name f))
1301 file-name)
1315 (setq file-name (symbol-file f 'defface))
1316 (setq file-name (describe-simplify-lib-file-name file-name))
1317 (when file-name
1319 (princ file-name)
1324 (help-xref-button 1 'help-face-def f file-name))
1354 face attributes of FACE where ATTRIBUTE is the attribute name and
1357 (dolist (entry face-attribute-name-alist result)
1384 ;; color selection depends on the number
1401 (>= (display-color-cells frame) (car options)))
1447 (let ((attrs face-attribute-name-alist))
1449 (let ((attr-and-name (car attrs)))
1450 (set-face-attribute face frame (car attr-and-name) 'unspecified))
1490 (let ((list face-attribute-name-alist)
1522 ;;; Frame-type independent color support.
1534 (mapcar 'car (tty-color-alist frame))))
1537 (defun color-defined-p (color &optional frame)
1538 "Return non-nil if color COLOR is supported on frame FRAME.
1542 (if (member color '(unspecified "unspecified-bg" "unspecified-fg"))
1545 (xw-color-defined-p color frame)
1546 (numberp (tty-color-translate color frame)))))
1547 (defalias 'x-color-defined-p 'color-defined-p)
1549 (defun color-values (color &optional frame)
1550 "Return a description of the color named COLOR on frame FRAME.
1558 (if (member color '(unspecified "unspecified-fg" "unspecified-bg"))
1561 (xw-color-values color frame)
1562 (tty-color-values color frame))))
1563 (defalias 'x-color-values 'color-values)
1565 (defun display-color-p (&optional display)
1566 "Return t if DISPLAY supports color.
1568 DISPLAY should be either a frame or a display name (a string).
1571 (xw-display-color-p display)
1572 (tty-display-color-p display)))
1573 (defalias 'x-display-color-p 'display-color-p)
1582 (> (tty-color-gray-shades display) 2)))))
1592 Set this to the symbol `dark' if your background color is dark,
1620 (bg-color (frame-parameter frame 'background-color))
1625 ((and (null window-system) (null bg-color))
1628 ;; Unspecified frame background color can only happen
1630 ((member bg-color '(unspecified "unspecified-bg"))
1632 ((equal bg-color "unspecified-fg") ; inverted colors
1634 ((>= (apply '+ (color-values bg-color frame))
1638 (* (apply '+ (color-values "white" frame)) .6))
1643 (if (tty-display-color-p frame) 'color 'mono))
1644 ((display-color-p frame)
1645 'color)
1685 (let* ((name (or (cdr (assq 'name parameters))
1686 (cdr (assq 'name default-frame-alist))))
1687 (x-resource-name name)
1688 (res-geometry (if name (x-get-resource "geometry" "Geometry"))))
1713 (bg (cdr (assq 'foreground-color params)))
1714 (fg (cdr (assq 'background-color params))))
1716 (list (cons 'foreground-color fg)
1717 (cons 'background-color bg)))
1718 (if (equal bg (cdr (assq 'border-color params)))
1720 (list (cons 'border-color fg))))
1721 (if (equal bg (cdr (assq 'mouse-color params)))
1723 (list (cons 'mouse-color fg))))
1724 (if (equal bg (cdr (assq 'cursor-color params)))
1726 (list (cons 'cursor-color fg)))))))
1732 `default-frame-alist'. If PARAMETERS specify a frame name,
1733 handle X geometry resources for that name. If either PARAMETERS
1773 (let ((face-params '((foreground-color default :foreground)
1774 (background-color default :background)
1775 (border-color border :background)
1776 (cursor-color cursor :background)
1779 (mouse-color mouse :background)))
1820 (bg (cdr (assq 'foreground-color params)))
1821 (fg (cdr (assq 'background-color params))))
1823 (list (cons 'foreground-color fg)
1824 (cons 'background-color bg)))
1825 (if (equal bg (cdr (assq 'mouse-color params)))
1827 (list (cons 'mouse-color fg))))
1828 (if (equal bg (cdr (assq 'cursor-color params)))
1830 (list (cons 'cursor-color fg)))))))
1937 '((((class color grayscale) (min-colors 88) (background light))
1939 (((class color grayscale) (min-colors 88) (background dark))
1941 (((class color) (min-colors 8) (background light))
1943 (((class color) (min-colors 8) (background dark))
1950 '((((class color) (min-colors 88) (background light))
1952 (((class color) (background light))
1954 (((class color) (min-colors 88) (background dark))
1956 (((class color) (background dark))
1965 (((class color) (background light)) :foreground "magenta4")
1966 (((class color) (background dark)) :foreground "violet"))
1972 '((((class color) (min-colors 88) (background light))
1974 (((class color) (min-colors 88) (background dark))
1976 (((class color) (min-colors 16) (background light))
1978 (((class color) (min-colors 16) (background dark))
1980 (((class color) (min-colors 8))
1987 '((((class color) (min-colors 88) (background dark))
1989 (((class color) (min-colors 88) (background light))
1991 (((class color) (min-colors 16) (background dark))
1993 (((class color) (min-colors 16) (background light))
1995 (((class color) (min-colors 8))
2005 '((((class color) (min-colors 88) (background light))
2007 (((class color) (min-colors 88) (background dark))
2009 (((class color) (min-colors 16) (background light))
2011 (((class color) (min-colors 16) (background dark))
2013 (((class color) (min-colors 8))
2020 '((((class color) (background light))
2022 (((class color) (background dark))
2043 '((((class color) (min-colors 88)) :inherit escape-glyph :underline t)
2044 (((class color) (min-colors 8)) :background "magenta")
2057 '((((class color) (min-colors 88))
2070 (((class color) (min-colors 88) (background light))
2072 :box (:line-width -1 :color "grey75" :style nil)
2074 (((class color) (min-colors 88) (background dark) )
2076 :box (:line-width -1 :color "grey40" :style nil)
2084 '((((class color) (min-colors 88))
2085 :box (:line-width 2 :color "grey40" :style released-button))
2121 (((class color grayscale) (background light))
2124 (((class color grayscale) (background dark))
2150 ;; their foreground color to be blue.
2164 '((((class color) (background light))
2166 (((class color) (background dark))
2188 "Basic face for the cursor color under X.
2197 "Basic face for the mouse color under X."
2206 (((type x w32 mac) (class color))
2233 ;; international/fontset.el uses x-resolve-font-name. The following
2284 (defun x-resolve-font-name (pattern &optional face frame)
2285 "Return a font name matching PATTERN.
2287 If PATTERN is nil, return the name of the frame's base font, which never
2292 (setq face (face-name face)))