aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2000-08-30 12:09:58 +0000
committerMiles Bader2000-08-30 12:09:58 +0000
commitfaaf40e434a5230dae43be0aba6972d5f680962e (patch)
tree92f860a47e2167c2fcbe16dafd1ce7027e945b69
parent90c7e9f079e0260c18c689f8afda4869e5096e5b (diff)
downloademacs-faaf40e434a5230dae43be0aba6972d5f680962e.tar.gz
emacs-faaf40e434a5230dae43be0aba6972d5f680962e.zip
(set-frame-font): Do completion of font-name for interactive use.
-rw-r--r--lisp/frame.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index a33d8c41aaf..490c8c1bf3e 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -701,7 +701,14 @@ If FRAME is omitted, describe the currently selected frame."
701 "Set the font of the selected frame to FONT-NAME. 701 "Set the font of the selected frame to FONT-NAME.
702When called interactively, prompt for the name of the font to use. 702When called interactively, prompt for the name of the font to use.
703To get the frame's current default font, use `frame-parameters'." 703To get the frame's current default font, use `frame-parameters'."
704 (interactive "sFont name: ") 704 (interactive
705 (list
706 (let ((completion-ignore-case t))
707 (completing-read "Font name: "
708 (mapcar #'list
709 ;; x-list-fonts will fail with an error
710 ;; if this frame doesn't support fonts.
711 (x-list-fonts "*" nil (selected-frame)))))))
705 (modify-frame-parameters (selected-frame) 712 (modify-frame-parameters (selected-frame)
706 (list (cons 'font font-name))) 713 (list (cons 'font font-name)))
707 ;; Update faces that want a bold or italic version of the default font. 714 ;; Update faces that want a bold or italic version of the default font.