unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1560: 23.0.60; Cannot use function as value of :height face attribute
@ 2008-12-13 18:17 ` Drew Adams
  2009-01-01  8:35   ` bug#1560: marked as done (23.0.60; Cannot use function as value of :height face attribute) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2008-12-13 18:17 UTC (permalink / raw)
  To: emacs-pretest-bug

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'
 







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

* bug#1560: marked as done (23.0.60; Cannot use function as value  of :height face attribute)
  2008-12-13 18:17 ` bug#1560: 23.0.60; Cannot use function as value of :height face attribute Drew Adams
@ 2009-01-01  8:35   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-01-01  8:35 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]


Your message dated Thu, 01 Jan 2009 03:30:15 -0500
with message-id <87eiznv36w.fsf@cyd.mit.edu>
and subject line Re: 23.0.60; Cannot use function as value of :height face attribute
has caused the Emacs bug report #1560,
regarding 23.0.60; Cannot use function as value of :height face attribute
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
1560: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1560
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4526 bytes --]

From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: 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>

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'
 




[-- Attachment #3: Type: message/rfc822, Size: 1644 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 1560-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.60; Cannot use function as value of :height face attribute
Date: Thu, 01 Jan 2009 03:30:15 -0500
Message-ID: <87eiznv36w.fsf@cyd.mit.edu>

> M-: (set-face-attribute 'default (selected-frame) :height (quote 1+))
> 
> gives this error: (error "Invalid face height" 1+)
> 
> 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.

The default face must always be absolute (i.e., an integer).  I've
clarified the manual.


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

end of thread, other threads:[~2009-01-01  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87eiznv36w.fsf@cyd.mit.edu>
2008-12-13 18:17 ` bug#1560: 23.0.60; Cannot use function as value of :height face attribute Drew Adams
2009-01-01  8:35   ` bug#1560: marked as done (23.0.60; Cannot use function as value of :height face attribute) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).