Commit 6a1dcf59 authored by Eli Zaretskii's avatar Eli Zaretskii

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)
parent 4aa74ddd
Pipeline #914 failed with stage
in 49 minutes and 27 seconds
......@@ -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)
(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?
(push face locally-modified-faces)))
;; Now change to the new frame parameters
(modify-frame-parameters frame params)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment