* Apply font selection with buffer-face-mode-invoke
@ 2024-06-26 21:46 Heime
0 siblings, 0 replies; only message in thread
From: Heime @ 2024-06-26 21:46 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
Have started making this function. Currently it does a loop
and tries to apply the last font. I want to allow for a user
selection that will be used to call buffer-face-mode-invoke.
(defun mon-font-apply (font-family)
(interactive
(list
(completing-read " Family: " (font-family-list) nil t)))
(let ( (fonts (list-fonts (font-spec :family font-family))) )
(if fonts
(dolist (font fonts)
(buffer-face-mode-invoke `(:font ,font) t))
(message "No fonts found for family: %s" font-family))) )
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-26 21:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 21:46 Apply font selection with buffer-face-mode-invoke Heime
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.