emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107998: * faces.el (face-spec-set):


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107998: * faces.el (face-spec-set): Stop supporting deprecated form of third arg.
Date: Mon, 23 Apr 2012 02:04:54 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107998
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2012-04-23 02:04:54 +0800
message:
  * faces.el (face-spec-set): Stop supporting deprecated form of third arg.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/faces.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-04-22 14:11:43 +0000
+++ b/etc/NEWS  2012-04-22 18:04:54 +0000
@@ -138,6 +138,9 @@
 The function `user-variable-p' is now an obsolete alias for
 `custom-variable-p'.
 
+** `face-spec-set' no longer sets frame-specific attributes when the
+third argument is a frame (that usage was obsolete since Emacs 22.2).
+
 
 * Lisp changes in Emacs 24.2
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-22 17:58:14 +0000
+++ b/lisp/ChangeLog    2012-04-22 18:04:54 +0000
@@ -6,6 +6,9 @@
        "reset-saved" operation bring back the default (Bug#9509).
        (custom-face-state): Properly detect themed faces.
 
+       * faces.el (face-spec-set): Stop supporting deprecated form of
+       third arg.
+
 2012-04-22  Michael Albinus  <address@hidden>
 
        Move functions from C to Lisp.  Make non-blocking method calls

=== modified file 'lisp/faces.el'
--- a/lisp/faces.el     2012-04-09 13:05:48 +0000
+++ b/lisp/faces.el     2012-04-22 18:04:54 +0000
@@ -1532,35 +1532,29 @@
                          face-attribute-name-alist)))))
 
 (defun face-spec-set (face spec &optional for-defface)
-  "Set FACE's face spec, which controls its appearance, to SPEC.
-If FOR-DEFFACE is t, set the base spec, the one that `defface'
-  and Custom set.  (In that case, the caller must put it in the
-  appropriate property, because that depends on the caller.)
-If FOR-DEFFACE is nil, set the overriding spec (and store it
-  in the `face-override-spec' property of FACE).
-
-The appearance of FACE is controlled by the base spec,
-by any custom theme specs on top of that, and by the
-overriding spec on top of all the rest.
-
-FOR-DEFFACE can also be a frame, in which case we set the
-frame-specific attributes of FACE for that frame based on SPEC.
-That usage is deprecated.
-
-See `defface' for information about the format and meaning of SPEC."
-  (if (framep for-defface)
-      ;; Handle the deprecated case where third arg is a frame.
-      (face-spec-set-2 face for-defface spec)
-    (if for-defface
-       ;; When we reset the face based on its custom spec, then it is
-       ;; unmodified as far as Custom is concerned.
-       (put (or (get face 'face-alias) face) 'face-modified nil)
-      ;; When we change a face based on a spec from outside custom,
-      ;; record it for future frames.
-      (put (or (get face 'face-alias) face) 'face-override-spec spec))
-    ;; Reset each frame according to the rules implied by all its specs.
-    (dolist (frame (frame-list))
-      (face-spec-recalc face frame))))
+  "Set and apply the face spec for FACE.
+If the optional argument FOR-DEFFACE is omitted or nil, set the
+overriding spec to SPEC, recording it in the `face-override-spec'
+property of FACE.  See `defface' for the format of SPEC.
+
+If FOR-DEFFACE is non-nil, set the base spec (the one set by
+`defface' and Custom).  In this case, SPEC is ignored; the caller
+is responsible for putting the face spec in the `saved-face',
+`customized-face', or `face-defface-spec', as appropriate.
+
+The appearance of FACE is controlled by the base spec, by any
+custom theme specs on top of that, and by the overriding spec on
+top of all the rest."
+  (if for-defface
+      ;; When we reset the face based on its custom spec, then it is
+      ;; unmodified as far as Custom is concerned.
+      (put (or (get face 'face-alias) face) 'face-modified nil)
+    ;; When we change a face based on a spec from outside custom,
+    ;; record it for future frames.
+    (put (or (get face 'face-alias) face) 'face-override-spec spec))
+  ;; Reset each frame according to the rules implied by all its specs.
+  (dolist (frame (frame-list))
+    (face-spec-recalc face frame)))
 
 (defun face-spec-recalc (face frame)
   "Reset the face attributes of FACE on FRAME according to its specs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]