From: Chong Yidong Date: Sat, 28 Jun 2008 15:53:07 +0000 (+0000) Subject: (inhibit-face-set-after-frame-default): Var deleted. X-Git-Tag: emacs-pretest-23.0.90~4418 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96c1a8004a6d0e869fec6101381c89bfcc388aec;p=emacs.git (inhibit-face-set-after-frame-default): Var deleted. (set-face-attribute, face-set-after-frame-default)): Don't use it. --- diff --git a/lisp/faces.el b/lisp/faces.el index 4f62a5b1546..60ec91019b2 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -566,9 +566,6 @@ If FACE is a face-alias, get the documentation for the target face." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar inhibit-face-set-after-frame-default nil - "If non-nil, that tells `face-set-after-frame-default' to do nothing.") - (defun set-face-attribute (face frame &rest args) "Set attributes of FACE on FRAME from ARGS. @@ -708,21 +705,20 @@ like an underlying face would be, with higher priority than underlying faces." (while args ;; Don't recursively set the attributes from the frame's font param ;; when we update the frame's font param from the attributes. - (let ((inhibit-face-set-after-frame-default t)) - (if (and (eq (car args) :family) - (stringp (cadr args)) - (string-match "\\([^-]*\\)-\\([^-]*\\)" (cadr args))) - (let ((foundry (match-string 1 (cadr args))) - (family (match-string 2 (cadr args)))) - (internal-set-lisp-face-attribute face :foundry - (purecopy foundry) - where) - (internal-set-lisp-face-attribute face :family - (purecopy family) - where)) - (internal-set-lisp-face-attribute face (car args) - (purecopy (cadr args)) - where))) + (if (and (eq (car args) :family) + (stringp (cadr args)) + (string-match "\\([^-]*\\)-\\([^-]*\\)" (cadr args))) + (let ((foundry (match-string 1 (cadr args))) + (family (match-string 2 (cadr args)))) + (internal-set-lisp-face-attribute face :foundry + (purecopy foundry) + where) + (internal-set-lisp-face-attribute face :family + (purecopy family) + where)) + (internal-set-lisp-face-attribute face (car args) + (purecopy (cadr args)) + where)) (setq args (cdr (cdr args)))))) @@ -2005,20 +2001,19 @@ Value is the new frame created." (defun face-set-after-frame-default (frame) "Set frame-local faces of FRAME from face specs and resources. Initialize colors of certain faces from frame parameters." - (unless inhibit-face-set-after-frame-default - (if (face-attribute 'default :font t) - (set-face-attribute 'default frame :font - (face-attribute 'default :font t)) - (set-face-attribute 'default frame :family - (face-attribute 'default :family t)) - (set-face-attribute 'default frame :height - (face-attribute 'default :height t)) - (set-face-attribute 'default frame :slant - (face-attribute 'default :slant t)) - (set-face-attribute 'default frame :weight - (face-attribute 'default :weight t)) - (set-face-attribute 'default frame :width - (face-attribute 'default :width t)))) + (if (face-attribute 'default :font t) + (set-face-attribute 'default frame :font + (face-attribute 'default :font t)) + (set-face-attribute 'default frame :family + (face-attribute 'default :family t)) + (set-face-attribute 'default frame :height + (face-attribute 'default :height t)) + (set-face-attribute 'default frame :slant + (face-attribute 'default :slant t)) + (set-face-attribute 'default frame :weight + (face-attribute 'default :weight t)) + (set-face-attribute 'default frame :width + (face-attribute 'default :width t))) ;; Find attributes that should be initialized from frame parameters. (let ((face-params '((foreground-color default :foreground) (background-color default :background)