From 4582e356d19a7f73aa0a0c15ac9782387e16aa06 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 20 Jul 2022 14:57:15 +0300 Subject: [PATCH] Fix error during startup in -nw sessions * lisp/startup.el (normal-top-level, command-line-1): Don't mess with fonts in a text-mode session. (Bug#56660) --- lisp/startup.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index 6c5549e2c64..b0fbf7a34cd 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -802,7 +802,8 @@ It is the default value of the variable `top-level'." ;; objects and regenerate them; currently we do not. As a ;; workaround, we specifically reset the default face's :font ;; attribute here, if it was rescaled. See bug#1785. - (when (and (not (eq face-font-rescale-alist + (when (and (display-multi-font-p) + (not (eq face-font-rescale-alist old-face-font-rescale-alist)) (assoc (font-xlfd-name (face-attribute 'default :font)) face-font-rescale-alist #'string-match-p)) @@ -2845,7 +2846,8 @@ nil default-directory" name) ;; See the commentary in `normal-top-level' for why we do ;; this. - (when (and (not (eq face-font-rescale-alist + (when (and (display-multi-font-p) + (not (eq face-font-rescale-alist old-face-font-rescale-alist)) (assoc (font-xlfd-name (face-attribute 'default :font)) face-font-rescale-alist #'string-match-p)) -- 2.39.5