From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Change `set-frame-font' to allow keeping of frame size Date: Sun, 06 Apr 2003 19:07:36 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200304061535.h36FZ61t005675@beta.mvs.co.il> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1049672591 27813 80.91.224.249 (6 Apr 2003 23:43:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 6 Apr 2003 23:43:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 07 01:43:10 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 192Jn3-0007ET-00 for ; Mon, 07 Apr 2003 01:43:09 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 192JqJ-00014C-00 for ; Mon, 07 Apr 2003 01:46:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 192Jmc-0000AP-02 for emacs-devel@quimby.gnus.org; Sun, 06 Apr 2003 19:42:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 192Jlq-00081m-00 for emacs-devel@gnu.org; Sun, 06 Apr 2003 19:41:54 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 192Jlf-0007e2-00 for emacs-devel@gnu.org; Sun, 06 Apr 2003 19:41:44 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.10.13) id 192JlB-00078b-00 for emacs-devel@gnu.org; Sun, 06 Apr 2003 19:41:13 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 192JEe-00014c-00; Sun, 06 Apr 2003 19:07:36 -0400 Original-To: ehud@unix.mvs.co.il In-reply-to: <200304061535.h36FZ61t005675@beta.mvs.co.il> (ehud@unix.mvs.co.il) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12944 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12944 (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?