emacs-diffs
[Top][All Lists]
Advanced

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

master 10701635cf 2/3: Fix bug#59371


From: Po Lu
Subject: master 10701635cf 2/3: Fix bug#59371
Date: Sat, 19 Nov 2022 01:03:49 -0500 (EST)

branch: master
commit 10701635cfefde5e416215d72f4dababe0ce8d7f
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix bug#59371
    
    * src/frame.c (Freconsider_frame_fonts): If a font parameter was
    set, create a params alist with it.  Then, pass it to both
    default_font_parameter and face-set-after-frame-default.
    (bug#59371)
---
 src/frame.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/frame.c b/src/frame.c
index f63a19e7dc..151a402995 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -5959,18 +5959,26 @@ have changed.  */)
   (Lisp_Object frame)
 {
   struct frame *f;
+  Lisp_Object params;
 
   f = decode_window_system_frame (frame);
 
+  /* Kludge: if a `font' parameter was already specified,
+     create an alist containing just that parameter.  (bug#59371) */
+  params = Qnil;
+
+  if (!NILP (get_frame_param (f, Qfont)))
+    params = list1 (Fcons (Qfont, get_frame_param (f, Qfont)));
+
   /* First, call this to reinitialize any font backend specific
      stuff.  */
 
   if (FRAME_RIF (f)->default_font_parameter)
-    FRAME_RIF (f)->default_font_parameter (f, Qnil);
+    FRAME_RIF (f)->default_font_parameter (f, params);
 
   /* Now call this to apply the existing value(s) of the `default'
      face.  */
-  call1 (Qface_set_after_frame_default, frame);
+  call2 (Qface_set_after_frame_default, frame, params);
 
   return Qnil;
 }



reply via email to

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