From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1560: 23.0.60; Cannot use function as value of :height face attribute Date: Sat, 13 Dec 2008 10:17:23 -0800 Message-ID: <000401c95d4f$0bcb1d30$0200a8c0@us.oracle.com> Reply-To: Drew Adams , 1560@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229193877 1369 80.91.229.12 (13 Dec 2008 18:44:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Dec 2008 18:44:37 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 13 19:45:41 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LBZUi-0000mh-Ss for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Dec 2008 19:45:41 +0100 Original-Received: from localhost ([127.0.0.1]:47371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBZTX-0000xL-9q for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Dec 2008 13:44:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBZTS-0000vw-Lp for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2008 13:44:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBZTR-0000uS-BR for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2008 13:44:21 -0500 Original-Received: from [199.232.76.173] (port=35959 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBZTR-0000u8-5z for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2008 13:44:21 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33522) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBZTQ-00026j-Kk for bug-gnu-emacs@gnu.org; Sat, 13 Dec 2008 13:44:20 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBDIiIl0018637; Sat, 13 Dec 2008 10:44:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBDIP4sa013021; Sat, 13 Dec 2008 10:25:04 -0800 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 13 Dec 2008 18:25:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1560 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122919225011359 (code B ref -1); Sat, 13 Dec 2008 18:25:04 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 26; hammy, 124; neutral, 90; spammy, 2. spammytokens:0.921-2--scale, 0.912-2--prove hammytokens:0.000-+--emacs, 0.000-+--23.0.60, 0.000-+--23060, 0.000-+--Emacs, 0.000-+--gnu Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Dec 2008 18:17:30 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBDIHRns011351 for ; Sat, 13 Dec 2008 10:17:28 -0800 Original-Received: from mail.gnu.org ([199.232.76.166]:56843 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LBZ2k-0000lv-K8 for emacs-pretest-bug@gnu.org; Sat, 13 Dec 2008 13:16:46 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LBZ3M-0007WS-SF for emacs-pretest-bug@gnu.org; Sat, 13 Dec 2008 13:17:26 -0500 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:29571) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBZ3M-0007WM-G8 for emacs-pretest-bug@gnu.org; Sat, 13 Dec 2008 13:17:24 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBDIGxwq018259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 13 Dec 2008 18:17:01 GMT Original-Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBDIHRwR023712 for ; Sat, 13 Dec 2008 18:17:28 GMT Original-Received: from dradamslap1 (/141.144.80.117) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Dec 2008 10:17:17 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcldTwtkSdd3+MrpT6qNsF7r4Pfs+A== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt706.oracle.com [141.146.40.84] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4943FC2F.00BE:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 13 Dec 2008 13:44:21 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23270 gmane.emacs.pretest.bugs:23499 Archived-At: emacs -Q M-: (set-face-attribute 'default (selected-frame) :height (quote 1+)) gives this error: (error "Invalid face height" 1+) Emacs 22 gives the same error, BTW. But the Elisp manual, node Face Attributes says this: `:height' Either the font height, an integer in units of 1/10 point, a floating point number specifying the amount by which to scale the height of any underlying face, or a function, which is called with the old height (from the underlying face), and should return the new height. Am I misunderstanding the doc, or should you be able to use a function as the value of the :height attribute? What's more, if you do `M-x customize-face RET default', the Value Menu for attribute Height does not have an item for a function value. It has only `Height in 1/10 pt' and `Scale'. That suggests, but doesn't prove, that a function value is not allowed. And grepping the Elisp sources, I see no use of a function value for :height. Beyond this bug (or my misunderstanding), can we say more about the kind of function that would be needed? Is it supposed to treat each kind of :height value: integer, floating-point number, and function? The doc says the old height (passed to the function) is "from the underlying face", so I guess this means the actual face height, not the old value of :height. But which units are used for the actual face height? Are they too "units of 1/10 point"? In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-24 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping'