summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-07-20 14:57:15 +0300
committerEli Zaretskii <eliz@gnu.org>2022-07-20 14:57:15 +0300
commit4582e356d19a7f73aa0a0c15ac9782387e16aa06 (patch)
tree07305748f93792902801e97c8258a5d158447764 /lisp/startup.el
parentb70a00d9bf119b6bc5c1f7c3397d04b7d8892fb7 (diff)
downloademacs-4582e356d19a7f73aa0a0c15ac9782387e16aa06.tar.gz
emacs-4582e356d19a7f73aa0a0c15ac9782387e16aa06.tar.bz2
emacs-4582e356d19a7f73aa0a0c15ac9782387e16aa06.zip
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)
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el6
1 files 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))