# HG changeset patch # User Miles Bader # Date 967637398 0 # Node ID 84df0ccd61c03e0f514d2feddc39ccd8f27330ee # Parent c37c79e6a6e7f862275e963a445b474630227ac7 (set-frame-font): Do completion of font-name for interactive use. diff -r c37c79e6a6e7 -r 84df0ccd61c0 lisp/frame.el --- a/lisp/frame.el Wed Aug 30 11:52:37 2000 +0000 +++ b/lisp/frame.el Wed Aug 30 12:09:58 2000 +0000 @@ -701,7 +701,14 @@ "Set the font of the selected frame to FONT-NAME. When called interactively, prompt for the name of the font to use. To get the frame's current default font, use `frame-parameters'." - (interactive "sFont name: ") + (interactive + (list + (let ((completion-ignore-case t)) + (completing-read "Font name: " + (mapcar #'list + ;; x-list-fonts will fail with an error + ;; if this frame doesn't support fonts. + (x-list-fonts "*" nil (selected-frame))))))) (modify-frame-parameters (selected-frame) (list (cons 'font font-name))) ;; Update faces that want a bold or italic version of the default font.