aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-04-23 02:04:54 +0800
committerChong Yidong2012-04-23 02:04:54 +0800
commiteeddc5310ac04e9f5a0cce072f378ff5c76dae65 (patch)
tree327922c0cbb228705f42d4951d5b21130c8ba2af
parentc2d1019e3540ffcace2cd72d46a1e85958c4d584 (diff)
downloademacs-eeddc5310ac04e9f5a0cce072f378ff5c76dae65.tar.gz
emacs-eeddc5310ac04e9f5a0cce072f378ff5c76dae65.zip
* faces.el (face-spec-set): Stop supporting deprecated form of third arg.
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/faces.el52
3 files changed, 29 insertions, 29 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 3b53f9df97a..e728002230c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -138,6 +138,9 @@ Only variables defined using `defcustom' are considered user options.
138The function `user-variable-p' is now an obsolete alias for 138The function `user-variable-p' is now an obsolete alias for
139`custom-variable-p'. 139`custom-variable-p'.
140 140
141** `face-spec-set' no longer sets frame-specific attributes when the
142third argument is a frame (that usage was obsolete since Emacs 22.2).
143
141 144
142* Lisp changes in Emacs 24.2 145* Lisp changes in Emacs 24.2
143 146
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 11cb03dea14..dd2d9ff86aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,9 @@
6 "reset-saved" operation bring back the default (Bug#9509). 6 "reset-saved" operation bring back the default (Bug#9509).
7 (custom-face-state): Properly detect themed faces. 7 (custom-face-state): Properly detect themed faces.
8 8
9 * faces.el (face-spec-set): Stop supporting deprecated form of
10 third arg.
11
92012-04-22 Michael Albinus <michael.albinus@gmx.de> 122012-04-22 Michael Albinus <michael.albinus@gmx.de>
10 13
11 Move functions from C to Lisp. Make non-blocking method calls 14 Move functions from C to Lisp. Make non-blocking method calls
diff --git a/lisp/faces.el b/lisp/faces.el
index 8eacf5bcfe2..b3b0fa9b7d2 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1532,35 +1532,29 @@ If SPEC is nil, return nil."
1532 face-attribute-name-alist))))) 1532 face-attribute-name-alist)))))
1533 1533
1534(defun face-spec-set (face spec &optional for-defface) 1534(defun face-spec-set (face spec &optional for-defface)
1535 "Set FACE's face spec, which controls its appearance, to SPEC. 1535 "Set and apply the face spec for FACE.
1536If FOR-DEFFACE is t, set the base spec, the one that `defface' 1536If the optional argument FOR-DEFFACE is omitted or nil, set the
1537 and Custom set. (In that case, the caller must put it in the 1537overriding spec to SPEC, recording it in the `face-override-spec'
1538 appropriate property, because that depends on the caller.) 1538property of FACE. See `defface' for the format of SPEC.
1539If FOR-DEFFACE is nil, set the overriding spec (and store it 1539
1540 in the `face-override-spec' property of FACE). 1540If FOR-DEFFACE is non-nil, set the base spec (the one set by
1541 1541`defface' and Custom). In this case, SPEC is ignored; the caller
1542The appearance of FACE is controlled by the base spec, 1542is responsible for putting the face spec in the `saved-face',
1543by any custom theme specs on top of that, and by the 1543`customized-face', or `face-defface-spec', as appropriate.
1544overriding spec on top of all the rest. 1544
1545 1545The appearance of FACE is controlled by the base spec, by any
1546FOR-DEFFACE can also be a frame, in which case we set the 1546custom theme specs on top of that, and by the overriding spec on
1547frame-specific attributes of FACE for that frame based on SPEC. 1547top of all the rest."
1548That usage is deprecated. 1548 (if for-defface
1549 1549 ;; When we reset the face based on its custom spec, then it is
1550See `defface' for information about the format and meaning of SPEC." 1550 ;; unmodified as far as Custom is concerned.
1551 (if (framep for-defface) 1551 (put (or (get face 'face-alias) face) 'face-modified nil)
1552 ;; Handle the deprecated case where third arg is a frame. 1552 ;; When we change a face based on a spec from outside custom,
1553 (face-spec-set-2 face for-defface spec) 1553 ;; record it for future frames.
1554 (if for-defface 1554 (put (or (get face 'face-alias) face) 'face-override-spec spec))
1555 ;; When we reset the face based on its custom spec, then it is 1555 ;; Reset each frame according to the rules implied by all its specs.
1556 ;; unmodified as far as Custom is concerned. 1556 (dolist (frame (frame-list))
1557 (put (or (get face 'face-alias) face) 'face-modified nil) 1557 (face-spec-recalc face frame)))
1558 ;; When we change a face based on a spec from outside custom,
1559 ;; record it for future frames.
1560 (put (or (get face 'face-alias) face) 'face-override-spec spec))
1561 ;; Reset each frame according to the rules implied by all its specs.
1562 (dolist (frame (frame-list))
1563 (face-spec-recalc face frame))))
1564 1558
1565(defun face-spec-recalc (face frame) 1559(defun face-spec-recalc (face frame)
1566 "Reset the face attributes of FACE on FRAME according to its specs. 1560 "Reset the face attributes of FACE on FRAME according to its specs.