[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6a1dcf5: Fix invocation with -rv on the command lin
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 6a1dcf5: Fix invocation with -rv on the command line |
Date: |
Mon, 4 Mar 2019 11:29:43 -0500 (EST) |
branch: master
commit 6a1dcf594a8b6aa72820f04b529aa3454cf3fc61
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix invocation with -rv on the command line
* lisp/frame.el (frame-set-background-mode): Avoid errors from
'face-spec-match-p' when the face was not yet realized for
FRAME. (Bug#34725)
---
lisp/frame.el | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lisp/frame.el b/lisp/frame.el
index 8a4a0b6..7fe3282 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1119,9 +1119,23 @@ face specs for the new background mode."
;; most faces are unmodified).
(dolist (face (face-list))
(and (not (get face 'face-override-spec))
- (not (face-spec-match-p face
- (face-user-default-spec face)
- (selected-frame)))
+ (not (and
+ ;; If the face was not yet realized for the
+ ;; frame, face-spec-match-p will signal an
+ ;; error, so treat such a missing face as
+ ;; having a mismatched spec; the call to
+ ;; face-spec-recalc below will then realize
+ ;; the face for the frame. This happens
+ ;; during startup with -rv on the command
+ ;; line for the initial frame, because frames
+ ;; are not recorded in the pdump file.
+ (assq face (frame-face-alist))
+ (face-spec-match-p face
+ (face-user-default-spec face)
+ ;; FIXME: why selected-frame and
+ ;; not the frame that is the
+ ;; argument to this function?
+ (selected-frame))))
(push face locally-modified-faces)))
;; Now change to the new frame parameters
(modify-frame-parameters frame params)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6a1dcf5: Fix invocation with -rv on the command line,
Eli Zaretskii <=