]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
(ispell): New function, replacing an alias.
[gnu-emacs] / lisp / faces.el
index 3ed3bb7aa74f4e7bbb277003ba7f3c11f585fac3..48ec17c3b8581ab4fcc0aca27d24a2ac87a9832b 100644 (file)
@@ -50,6 +50,7 @@ example, if `:slant' appears before `:height', font selection first
 tries to find a font with a suitable slant, even if this results in
 a font height that isn't optimal."
   :tag "Font selection order."
+  :type '(list symbol symbol symbol symbol)
   :group 'font-selection
   :set #'(lambda (symbol value)
           (set-default symbol value)
@@ -64,6 +65,7 @@ Each element has the the form (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...).
 If fonts of family FAMILY can't be loaded, try ALTERNATIVE1, then
 ALTERNATIVE2 etc."
   :tag "Alternative font families to try."
+  :type '(repeat (repeat string))
   :group 'font-selection
   :set #'(lambda (symbol value)
           (set-default symbol value)
@@ -156,7 +158,7 @@ If NAME is already a face, it is simply returned.
 This function is defined for compatibility with Emacs 20.2.  It
 should not be used anymore."
   (facep name))
-(make-obsolete 'internal-find-face 'facep)
+(make-obsolete 'internal-find-face 'facep "21.1")
 
 
 (defun internal-get-face (name &optional frame)
@@ -170,7 +172,7 @@ This function is defined for compatibility with Emacs 20.2.  It
 should not be used anymore."
   (or (internal-find-face name frame)
       (check-face name)))
-(make-obsolete 'internal-get-face "See `facep' and `check-face'.")
+(make-obsolete 'internal-get-face "See `facep' and `check-face'." "21.1")
 
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -263,7 +265,6 @@ If FRAME is omitted or nil, use the selected frame."
     (:stipple
      (".attributeStipple" . "Face.AttributeStipple")
      (".attributeBackgroundPixmap" . "Face.AttributeBackgroundPixmap"))
-    (:font (".attributeFont" . "Face.AttributeFont"))
     (:bold (".attributeBold" . "Face.AttributeBold"))
     (:italic (".attributeItalic" . "Face.AttributeItalic"))
     (:font (".attributeFont" . "Face.AttributeFont")))
@@ -1167,8 +1168,11 @@ do it on all frames.  See `defface' for information about SPEC."
        ;; Support some old-style attribute names and values.
        (case attribute
          (:bold (setq attribute :weight value (if value 'bold 'normal)))
-         (:italic (setq attribute :slant value (if value 'italic 'normal))))
-       (setq params (cons attribute (cons value params))))
+         (:italic (setq attribute :slant value (if value 'italic 'normal)))
+         (t (unless (assq attribute face-x-resources)
+              (setq attribute nil))))
+       (when attribute
+         (setq params (cons attribute (cons value params)))))
       (setq attrs (cdr (cdr attrs))))
     (face-spec-reset-face face frame)
     (apply #'set-face-attribute face frame params)))
@@ -1269,10 +1273,11 @@ If omitted or nil, that stands for the selected frame's display."
   "*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."
+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 var value)
+          (set-default var value)
           (mapcar 'frame-set-background-mode (frame-list)))
   :initialize 'custom-initialize-changed
   :type '(choice (choice-item dark)
@@ -1469,16 +1474,14 @@ created."
 
 ;; Update a frame's faces when we change its default font.
 
-(defun frame-update-faces (frame)
-  nil)
-(make-obsolete 'frame-update-faces "No longer necessary")
+(defalias 'frame-update-faces 'ignore)
+(make-obsolete 'frame-update-faces "No longer necessary" "21.1")
 
 ;; Update the colors of FACE, after FRAME's own colors have been
 ;; changed.
 
-(defun frame-update-face-colors (frame)
-  (frame-set-background-mode frame))
-(make-obsolete 'frame-update-face-colors 'frame-set-background-mode)
+(defalias 'frame-update-face-colors 'frame-set-background-mode)
+(make-obsolete 'frame-update-face-colors 'frame-set-background-mode "21.1")
 
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1498,9 +1501,11 @@ created."
 
 (defface mode-line
   '((((type x) (class color))
-     (:box (:line-width 2 :style released-button) :background "grey75"))
+     (:box (:line-width 2 :style released-button)
+          :background "grey75" :foreground "black"))
     (((type w32) (class color))
-     (:box (:line-width 2 :style released-button) :background "grey75"))
+     (:box (:line-width 2 :style released-button)
+          :background "grey75" :foreground "black"))
     (t
      (:inverse-video t)))
   "Basic mode line face."
@@ -1513,9 +1518,11 @@ created."
 
 (defface header-line
   '((((type x) (class color))
-     (:box (:line-width 2 :style released-button) :background "grey75"))
+     (:box (:line-width 2 :style released-button)
+          :background "grey75" :foreground "black"))
     (((type w32) (class color))
-     (:box (:line-width 2 :style released-button) :background "grey75"))
+     (:box (:line-width 2 :style released-button)
+          :background "grey75" :foreground "black"))
     (t
      (:inverse-video t)))
   "Basic header-line face."
@@ -1525,11 +1532,14 @@ created."
 
 (defface tool-bar
   '((((type x) (class color))
-     (:box (:line-width 1 :style released-button) :background "grey75"))
+     (:box (:line-width 1 :style released-button)
+          :background "grey75" :foreground "black"))
     (((type x) (class mono))
-     (:box (:line-width 1 :style released-button) :background "grey"))
+     (:box (:line-width 1 :style released-button)
+          :background "grey" :foreground "black"))
     (((type w32) (class color))
-     (:box (:line-width 1 :style released-button) :background "grey75"))
+     (:box (:line-width 1 :style released-button)
+          :background "grey75" :foreground "black"))
     (t
      ()))
   "Basic tool-bar face."
@@ -1545,17 +1555,19 @@ created."
     (((class color) (background dark))
      (:background "blue"))
     (((class color) (background light))
-     (:background "lightblue"))
+     (:background "light goldenrod yellow"))
     (t (:background "gray")))
   "Basic face for highlighting the region."
   :group 'basic-faces)
 
 
 (defface fringe
-  '((((class color))
-     (:background "grey95"))
-    (t
-     (:background "gray")))
+  '((((class color) (background light))
+       (:background "grey95"))
+      (((class color) (background dark))
+       (:background "grey10"))
+      (t
+       (:background "gray")))
   "Basic face for the fringes to the left and right of windows under X."
   :version "21.1"
   :group 'frames
@@ -1771,7 +1783,7 @@ also the same size as FACE on FRAME, or fail."
          ((string-match x-font-regexp-weight font)
           (concat (substring font 0 (match-beginning 1)) which
                   (substring font (match-end 1)))))))
-(make-obsolete 'x-frob-font-weight 'make-face-...)
+(make-obsolete 'x-frob-font-weight 'make-face-... "21.1")
 
 (defun x-frob-font-slant (font which)
   (let ((case-fold-search t))
@@ -1792,50 +1804,50 @@ also the same size as FACE on FRAME, or fail."
          ((string-match x-font-regexp-slant font)
           (concat (substring font 0 (match-beginning 1)) which
                   (substring font (match-end 1)))))))
-(make-obsolete 'x-frob-font-slant 'make-face-...)
+(make-obsolete 'x-frob-font-slant 'make-face-... "21.1")
 
 (defun x-make-font-bold (font)
   "Given an X font specification, make a bold version of it.
 If that can't be done, return nil."
   (x-frob-font-weight font "bold"))
-(make-obsolete 'x-make-font-bold 'make-face-bold)
+(make-obsolete 'x-make-font-bold 'make-face-bold "21.1")
 
 (defun x-make-font-demibold (font)
   "Given an X font specification, make a demibold version of it.
 If that can't be done, return nil."
   (x-frob-font-weight font "demibold"))
-(make-obsolete 'x-make-font-demibold 'make-face-bold)
+(make-obsolete 'x-make-font-demibold 'make-face-bold "21.1")
 
 (defun x-make-font-unbold (font)
   "Given an X font specification, make a non-bold version of it.
 If that can't be done, return nil."
   (x-frob-font-weight font "medium"))
-(make-obsolete 'x-make-font-unbold 'make-face-unbold)
+(make-obsolete 'x-make-font-unbold 'make-face-unbold "21.1")
 
 (defun x-make-font-italic (font)
   "Given an X font specification, make an italic version of it.
 If that can't be done, return nil."
   (x-frob-font-slant font "i"))
-(make-obsolete 'x-make-font-italic 'make-face-italic)
+(make-obsolete 'x-make-font-italic 'make-face-italic "21.1")
 
 (defun x-make-font-oblique (font) ; you say tomayto...
   "Given an X font specification, make an oblique version of it.
 If that can't be done, return nil."
   (x-frob-font-slant font "o"))
-(make-obsolete 'x-make-font-oblique 'make-face-italic)
+(make-obsolete 'x-make-font-oblique 'make-face-italic "21.1")
 
 (defun x-make-font-unitalic (font)
   "Given an X font specification, make a non-italic version of it.
 If that can't be done, return nil."
   (x-frob-font-slant font "r"))
-(make-obsolete 'x-make-font-unitalic 'make-face-unitalic)
+(make-obsolete 'x-make-font-unitalic 'make-face-unitalic "21.1")
 
 (defun x-make-font-bold-italic (font)
   "Given an X font specification, make a bold and italic version of it.
 If that can't be done, return nil."
   (and (setq font (x-make-font-bold font))
        (x-make-font-italic font)))
-(make-obsolete 'x-make-font-bold-italic 'make-face-bold-italic)
+(make-obsolete 'x-make-font-bold-italic 'make-face-bold-italic "21.1")
 
 (provide 'faces)