aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/frame.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index aff1d479eca..378d7c8e5ba 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1397,7 +1397,7 @@ FRAME defaults to the selected frame."
1397(declare-function x-list-fonts "xfaces.c" 1397(declare-function x-list-fonts "xfaces.c"
1398 (pattern &optional face frame maximum width)) 1398 (pattern &optional face frame maximum width))
1399 1399
1400(defun set-frame-font (font &optional keep-size frames) 1400(defun set-frame-font (font &optional keep-size frames inhibit-customize)
1401 "Set the default font to FONT. 1401 "Set the default font to FONT.
1402When called interactively, prompt for the name of a font, and use 1402When called interactively, prompt for the name of a font, and use
1403that font on the selected frame. When called from Lisp, FONT 1403that font on the selected frame. When called from Lisp, FONT
@@ -1414,7 +1414,10 @@ If FRAMES is non-nil, it should be a list of frames to act upon,
1414or t meaning all existing graphical frames. 1414or t meaning all existing graphical frames.
1415Also, if FRAMES is non-nil, alter the user's Customization settings 1415Also, if FRAMES is non-nil, alter the user's Customization settings
1416as though the font-related attributes of the `default' face had been 1416as though the font-related attributes of the `default' face had been
1417\"set in this session\", so that the font is applied to future frames." 1417\"set in this session\", so that the font is applied to future frames.
1418
1419If INHIBIT-CUSTOMIZE is non-nil, don't update the user's
1420Customization settings."
1418 (interactive 1421 (interactive
1419 (let* ((completion-ignore-case t) 1422 (let* ((completion-ignore-case t)
1420 (default (frame-parameter nil 'font)) 1423 (default (frame-parameter nil 'font))
@@ -1451,7 +1454,8 @@ as though the font-related attributes of the `default' face had been
1451 f 1454 f
1452 (list (cons 'height (round height (frame-char-height f))) 1455 (list (cons 'height (round height (frame-char-height f)))
1453 (cons 'width (round width (frame-char-width f)))))))) 1456 (cons 'width (round width (frame-char-width f))))))))
1454 (when frames 1457 (when (and frames
1458 (not inhibit-customize))
1455 ;; Alter the user's Custom setting of the `default' face, but 1459 ;; Alter the user's Custom setting of the `default' face, but
1456 ;; only for font-related attributes. 1460 ;; only for font-related attributes.
1457 (let ((specs (cadr (assq 'user (get 'default 'theme-face)))) 1461 (let ((specs (cadr (assq 'user (get 'default 'theme-face))))