GNU bug report logs - #4114
23.1; face doc unclear - no explanation of "underlying" face or attribute value

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 11 Aug 2009 05:20:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: "Drew Adams" <drew.adams <at> oracle.com>
Subject: bug#4114 closed by Chong Yidong <cyd <at> stupidchicken.com> (Re:
 23.1; face doc unclear - no explanation of "underlying" face or attribute
 value)
Date: Sat, 15 Aug 2009 21:20:07 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#4114: 23.1; face doc unclear - no explanation of "underlying" face or attribute value

It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.


-- 
4114: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4114
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 4114-done <at> debbugs.gnu.org
Subject: Re: 23.1; face doc unclear - no explanation of "underlying" face or attribute value
Date: Sat, 15 Aug 2009 17:15:52 -0400
> In (elisp)Face Attributes, things are explained in terms of
> "underlying" face. But this notion is never introduced or explained.

Thanks, I've tweaked the text and added a reference to the node
Displaying Faces, where the concept is explained.

> I have no idea what was intended in any of these passages.

Here's an experiment that should make this clear.  Go to the default
*scratch* buffer and evaluate the following lines, one at a time:

;; Give the comments in this buffer a height of 15.
(set-face-attribute 'font-lock-comment-face nil :height 150)
;; Give characters 5 to 8 a height that's 0.9 times that of the
;; underlying face, in this case font-lock-comment-face.
(setq ov (make-overlay 5 8))
(overlay-put ov 'face (list :height 0.9))
[Message part 3 (message/rfc822, inline)]
From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 23.1; face doc unclear - no explanation of "underlying" face or attribute value
Date: Mon, 10 Aug 2009 22:12:01 -0700
emacs -Q
 
In (elisp)Face Attributes, things are explained in terms of
"underlying" face. But this notion is never introduced or
explained. Consequently, the descriptions that refer to this are
incomprehensible. This includes the description of :height and
:inherit:
 
`:height'
     Font height--either an integer in units of 1/10 point, or a
     floating point number specifying the amount by which to scale the
     height of any underlying face, or a function...
 
`: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....
 
Incomprehensible.
 
Similarly, in (elisp)Attribute Functions, "underlying value" is used
with no definition/explanation, making the explanation of
`merge-face-attribute' incomprehensible:
 
Function: merge-face-attribute attribute value1 value2
     If VALUE1 is a relative value for the face attribute ATTRIBUTE,
     returns it merged with the underlying value VALUE2; otherwise,...
 
Huh? Is "underlying" simply an extra word here (so that it should be
removed), or does it really say something about VALUE2 (what)?
 
I have no idea what was intended in any of these passages.  FWIW, no
such language appears anywhere in the Emacs 20 Elisp manual - is an
underlying face or attribute value something new since Emacs 20? If
so, define it so you can then use it to explain other things. If not,
please clarify what is meant in these passages.
 
Perhaps this use of "underlying" is a translation from some other
language?  In any case, there is no explanation of what is meant.
When you are defining face A, what is its "underlying" face (or
faces)?
 
 
 
In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 




This bug report was last modified 15 years and 341 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.