all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.