unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Changing string from completing-read to height for buffer-face-mode-invoke
@ 2024-06-23 10:36 Heime
  2024-06-23 11:30 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2024-06-23 10:36 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I am using the function falfont to change the font of a buffer or frame.

Do I need to change face-height to an integer rather than keeping it as a string ?


(require 'face-remap)

(defvar faljura t
  "A boolean variable that is true by default.")

(defun falfont (face-family face-height)

  (interactive

    (list

      (let ( (cseq '("Wargames" "URW Chancery L")) )

        (completing-read " Family Name: " cseq nil t "URW Chancery L"))


      (let ( (hseq '("220" "120")) )

        (completing-read " Face Height: " hseq nil t "80")) ))

  (pcase face-family

    ("Wargames"

         (if faljura

             (buffer-face-mode-invoke '(:family face-family :height face-height) t)

           (set-face-attribute 'default nil :family face-family :height face-height)))

    ("URW Chancery L"

         (if faljura

             (buffer-face-mode-invoke '(:family face-family :height face-height) t)

           (set-face-attribute 'default nil :family face-family :height face-height)))))






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-23 13:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-23 10:36 Changing string from completing-read to height for buffer-face-mode-invoke Heime
2024-06-23 11:30 ` Eli Zaretskii
2024-06-23 12:25   ` Heime
2024-06-23 12:35     ` Eli Zaretskii
2024-06-23 13:14       ` Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).