[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change `set-frame-font' to allow keeping of frame size

From: Richard Stallman
Subject: Re: Change `set-frame-font' to allow keeping of frame size
Date: Sun, 06 Apr 2003 19:07:36 -0400

      (defun set-frame-font (font-name)
        "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'.
    ! If optional KEEP-SIZE is non nil the current size of the frame is
    ! kept by adjusting the frame `height' and `width' parameters"
    !   (interactive
    !    (let* ((completion-ignore-case t)
    !     (font (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)))))
    !     (keep (yes-or-no-p "Keep size of frame after changing font ? ")))
    !      (list font keep)))

You need to add keep-size to the argument list, or it won't work.

Whether this is a good change, I am not sure.  I do not understand the
description of the feature.  What does it mean to "keep the current
size"?  And what is the other alternative?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]