]> code.delx.au - gnu-emacs/blobdiff - lisp/faces.el
Close bug#3992.
[gnu-emacs] / lisp / faces.el
index e117eb16751200abc9938c70482e957cf86231fe..900e96ed048e587d6558589e69f0b4e7ff047ec8 100644 (file)
@@ -1,7 +1,7 @@
 ;;; faces.el --- Lisp faces
 
 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-;;   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;;   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -590,7 +590,7 @@ the default for new frames (this is done automatically each time an
 attribute is changed on all frames).
 
 ARGS must come in pairs ATTRIBUTE VALUE.  ATTRIBUTE must be a valid
-face attribute name. All attributes can be set to `unspecified';
+face attribute name.  All attributes can be set to `unspecified';
 this fact is not further mentioned below.
 
 The following attributes are recognized:
@@ -735,10 +735,10 @@ like an underlying face would be, with higher priority than underlying faces."
        (unless foundry
          (setq foundry (match-string 1 family)))
        (setq family (match-string 2 family)))
-      (when (stringp family)
+      (when (or (stringp family) (eq family 'unspecified))
        (internal-set-lisp-face-attribute face :family (purecopy family)
                                          where))
-      (when (stringp foundry)
+      (when (or (stringp foundry) (eq foundry 'unspecified))
        (internal-set-lisp-face-attribute face :foundry (purecopy foundry)
                                          where)))
     (while args
@@ -988,9 +988,9 @@ Otherwise, return a single face."
 (defun face-valid-attribute-values (attribute &optional frame)
   "Return valid values for face attribute ATTRIBUTE.
 The optional argument FRAME is used to determine available fonts
-and colors.  If it is nil or not specified, the selected frame is
-used.  Value is an alist of (NAME . VALUE) if ATTRIBUTE expects a value
-out of a set of discrete values.  Value is `integerp' if ATTRIBUTE expects
+and colors.  If it is nil or not specified, the selected frame is used.
+Value is an alist of (NAME . VALUE) if ATTRIBUTE expects a value out
+of a set of discrete values.  Value is `integerp' if ATTRIBUTE expects
 an integer value."
   (let ((valid
          (case attribute
@@ -1273,8 +1273,7 @@ arg, prompt for a regular expression."
     (setq max-length (1+ max-length)
          line-format (format "%%-%ds" max-length))
     (with-help-window "*Faces*"
-      (save-excursion
-       (set-buffer standard-output)
+      (with-current-buffer standard-output
        (setq truncate-lines t)
        (insert
         (substitute-command-keys
@@ -1362,8 +1361,7 @@ If FRAME is omitted or nil, use the selected frame."
     (if (not (listp face))
        (setq face (list face)))
     (with-help-window (help-buffer)
-      (save-excursion
-       (set-buffer standard-output)
+      (with-current-buffer standard-output
        (dolist (f face)
          (if (stringp f) (setq f (intern f)))
          ;; We may get called for anonymous faces (i.e., faces
@@ -2038,7 +2036,7 @@ Calculate the face definitions using the face specs, custom theme
 settings, X resources, and `face-new-frame-defaults'.
 Finally, apply any relevant face attributes found amongst the
 frame parameters in PARAMETERS and `default-frame-alist'."
-  (dolist (face (nreverse (face-list)))
+  (dolist (face (nreverse (face-list))) ;Why reverse?  --Stef
     (condition-case ()
        (progn
          ;; Initialize faces from face spec and custom theme.