* bug#2659: 23.0.91; set-face-attribute :height float on a Mac
@ 2009-03-13 15:11 Alex Schröder
2009-03-13 16:08 ` Stefan Monnier
[not found] ` <mailman.3128.1237105313.31690.bug-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Alex Schröder @ 2009-03-13 15:11 UTC (permalink / raw
To: emacs-pretest-bug
The following results in an error:
(set-face-attribute 'default nil :height 1.1)
Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
internal-set-lisp-face-attribute(default :height 1.1 0)
set-face-attribute(default nil :height 1.1)
I think it should not because the doc string says:
`:height'
VALUE must be either an integer specifying the height of the font to use
in 1/10 pt, a floating point number specifying the amount by which to
scale any underlying face, or a function, which is called with the old
height (from the underlying face), and should return the new height.
Either that, or the doc string must be improved. :)
I'm using Apple's Mac OS 10.3.9.
In GNU Emacs 23.0.91.1 (powerpc-apple-darwin7.9.0, NS apple-appkit-743.43)
of 2009-03-13 on Alpinobombus.local
Windowing system distributor `Apple', version 10.3.743
configured using `configure '--with-ns''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2659: 23.0.91; set-face-attribute :height float on a Mac
2009-03-13 15:11 bug#2659: 23.0.91; set-face-attribute :height float on a Mac Alex Schröder
@ 2009-03-13 16:08 ` Stefan Monnier
2009-03-13 16:22 ` Alex Schröder
[not found] ` <mailman.3128.1237105313.31690.bug-gnu-emacs@gnu.org>
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2009-03-13 16:08 UTC (permalink / raw
To: Alex Schröder; +Cc: 2659
> Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
This says that you can't specify "1.1 times the underlying face" because
the default face as no underlying face.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2659: 23.0.91; set-face-attribute :height float on a Mac
2009-03-13 16:08 ` Stefan Monnier
@ 2009-03-13 16:22 ` Alex Schröder
0 siblings, 0 replies; 5+ messages in thread
From: Alex Schröder @ 2009-03-13 16:22 UTC (permalink / raw
To: Stefan Monnier; +Cc: 2659
Ah. I misunderstood the doc string, then. Can we improve the docstring
and find another way to say "underlying face"? The word underlying
doesn't appear in the Elisp manual index. When I read your answer I
thought that underlying faces are the faces are the faces I inherit
from. But when I look at (elisp) Face Attributes I see the following:
`:inherit'
The name of a face from which to inherit attributes, or a list of
face names. Attributes from inherited faces are merged into the
face like an underlying face would be, with higher priority than
underlying faces. If a list of faces is used, attributes from
faces earlier in the list override those from later faces.
Apparently there is a difference between inheritance and underlying
that I don't understand.
On Fri, Mar 13, 2009 at 17:08, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
>
> This says that you can't specify "1.1 times the underlying face" because
> the default face as no underlying face.
>
>
> Stefan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2659: 23.0.91; set-face-attribute :height float on a Mac
[not found] ` <mailman.3128.1237105313.31690.bug-gnu-emacs@gnu.org>
@ 2009-03-16 1:31 ` Miles Bader
2011-02-03 6:55 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2009-03-16 1:31 UTC (permalink / raw
To: gnu-emacs-bug
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> Debugger entered--Lisp error: (error "Invalid default face height" 1.1)
>
> This says that you can't specify "1.1 times the underlying face" because
> the default face as no underlying face.
Note that because the default face height is always absolute and fixed,
it should be easy enough to do what you want by retrieving the current
height and multiplying it yourself.
e.g.
(set-face-attribute 'default nil
:height (truncate
(* (face-attribute 'default :height) 1.1)))
-Miles
--
Virtues, n. pl. Certain abstentions.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2659: 23.0.91; set-face-attribute :height float on a Mac
2009-03-16 1:31 ` Miles Bader
@ 2011-02-03 6:55 ` Glenn Morris
0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2011-02-03 6:55 UTC (permalink / raw
To: 2659-done
Version: 23.3
Tried to improve the doc-string of set-face-attribute, and the error message.
The lispref already seems pretty clear on this.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-03 6:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-13 15:11 bug#2659: 23.0.91; set-face-attribute :height float on a Mac Alex Schröder
2009-03-13 16:08 ` Stefan Monnier
2009-03-13 16:22 ` Alex Schröder
[not found] ` <mailman.3128.1237105313.31690.bug-gnu-emacs@gnu.org>
2009-03-16 1:31 ` Miles Bader
2011-02-03 6:55 ` Glenn Morris
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.