]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
Update copyright year to 2015
[gnu-emacs] / lisp / faces.el
index bb77af0425e26d9ed40197c643863408037d8f33..22bf26267222da7a47e38d42c3910264eb4dd628 100644 (file)
@@ -1,6 +1,6 @@
 ;;; faces.el --- Lisp faces
 
-;; Copyright (C) 1992-1996, 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1996, 1998-2015 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
@@ -53,7 +53,7 @@ This means to treat a terminal of type TYPE as if it were of type ALIAS."
   :type '(alist :key-type (string :tag "Terminal")
                :value-type (string :tag "Alias"))
   :group 'terminals
-  :version "24.5")
+  :version "25.1")
 
 (declare-function xw-defined-colors "term/common-win" (&optional frame))
 
@@ -370,10 +370,7 @@ If `inhibit-x-resources' is non-nil, this function does nothing."
 
 (defun face-name (face)
   "Return the name of face FACE."
-  (check-face face)
-  (if (symbolp face)
-      (symbol-name face)
-    face))
+  (symbol-name (check-face face)))
 
 
 (defun face-all-attributes (face &optional frame)
@@ -1828,7 +1825,9 @@ If omitted or nil, that stands for the selected frame's display."
 (declare-function x-display-grayscale-p "xfns.c" (&optional terminal))
 
 (defun display-grayscale-p (&optional display)
-  "Return non-nil if frames on DISPLAY can display shades of gray."
+  "Return non-nil if frames on DISPLAY can display shades of gray.
+DISPLAY should be either a frame or a display name (a string).
+If omitted or nil, that stands for the selected frame's display."
   (let ((frame-type (framep-on-display display)))
     (cond
      ((memq frame-type '(x w32 ns))
@@ -2093,7 +2092,8 @@ frame parameters in PARAMETERS."
             (value (cdr (assq param-name parameters))))
        (if value
            (set-face-attribute (nth 1 param) frame
-                               (nth 2 param) value))))))
+                               (nth 2 param) value))))
+    (frame-can-run-window-configuration-change-hook frame t)))
 
 (defun tty-handle-reverse-video (frame parameters)
   "Handle the reverse-video frame parameter for terminal frames."
@@ -2749,8 +2749,6 @@ If PATTERN is nil, return the name of the frame's base font, which never
 contains wildcards.
 Given optional arguments FACE and FRAME, return a font which is
 also the same size as FACE on FRAME, or fail."
-  (when face
-    (setq face (face-name face)))
   (and (eq frame t)
        (setq frame nil))
   (if pattern