Function: mouse-set-font
mouse-set-font is an interactive and byte-compiled function defined in
mouse.el.gz.
Signature
(mouse-set-font &rest FONTS)
Documentation
Set the default font for the selected frame.
The argument FONTS is a list of font names; the first valid font in this list is used.
When called interactively, pop up a menu and allow the user to choose a font.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defun mouse-set-font (&rest fonts)
"Set the default font for the selected frame.
The argument FONTS is a list of font names; the first valid font
in this list is used.
When called interactively, pop up a menu and allow the user to
choose a font."
(interactive
(progn (unless (display-multi-font-p)
(error "Cannot change fonts on this display"))
(x-popup-menu
(if (listp last-nonmenu-event)
last-nonmenu-event
(list '(0 0) (selected-window)))
;; Append list of fontsets currently defined.
(append x-fixed-font-alist (list (generate-fontset-menu))))))
(if fonts
(let (font)
(while fonts
(condition-case nil
(progn
(set-frame-font (car fonts))
(setq font (car fonts))
(setq fonts nil))
(error
(setq fonts (cdr fonts)))))
(if (null font)
(error "Font not found")))))