emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help-default-arg-highlight


From: Kenichi Handa
Subject: Re: help-default-arg-highlight
Date: Mon, 31 May 2004 21:26:51 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Juanma Barranquero <address@hidden> writes:
> On Mon, 31 May 2004 17:54:33 +0900 (JST)
> Kenichi Handa <address@hidden> wrote:

>>  I think the most messy part is that the current mechanism
>>  always puts the highest priority on family.  So, if family
>>  is not specified, Emacs tries to find an italic font only
>>  among the fonts of the same family as the default font.

> But the problem is not that we cannot find an italized
> font.

From a user's point of view, it's a problem.

> The problem
> is that we don't know (at least, *I* don't know) whether the result of
> applying an attribute to a face gives back a different face. We should
> be able to ask these questions, I think.

Even if we can know that, a user will be disappointed if we
can't display arguments in italic face despite that a user
has an italic font.

By the way, how about the attached small change to
internal-char-font?  The optional 3rd arg PROP is the same
as that of merge_face_vector_with_property.

/* Given a Lisp face attribute vector TO and a Lisp object PROP that
   is a face property, determine the resulting face attributes on
   frame F, and store them in TO.  PROP may be a single face
   specification or a list of such specifications.  Each face
   specification can be

   1. A symbol or string naming a Lisp face.

   2. A property list of the form (KEYWORD VALUE ...) where each
   KEYWORD is a face attribute name, and value is an appropriate value
   for that attribute.

   3. Conses or the form (FOREGROUND-COLOR . COLOR) or
   (BACKGROUND-COLOR . COLOR) where COLOR is a color name.  This is
   for compatibility with 20.2.

   Face specifications earlier in lists take precedence over later
   specifications.  */

With this, we can get a name of font that is used to display
CH with PROP.  Then, with one more new function, say,
font-italic-p or get-font-attribute (they can use the
function split_font_name), we can know how exactly PROP is
satisfied.

---
Ken'ichi HANDA
address@hidden


*** fontset.c   23 Apr 2004 10:55:57 +0900      1.86
--- fontset.c   31 May 2004 21:20:58 +0900      
***************
*** 1236,1245 ****
     POSITION is currently not visible.  */
  
  
! DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 
0,
         doc: /* For internal use only.  */)
!      (position, ch)
!      Lisp_Object position, ch;
  {
    int pos, pos_byte, dummy;
    int face_id;
--- 1236,1245 ----
     POSITION is currently not visible.  */
  
  
! DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 3, 
0,
         doc: /* For internal use only.  */)
!      (position, ch, prop)
!      Lisp_Object position, ch, prop;
  {
    int pos, pos_byte, dummy;
    int face_id;
***************
*** 1252,1258 ****
        CHECK_NATNUM (ch);
        c = XINT (ch);
        f = XFRAME (selected_frame);
!       face_id = DEFAULT_FACE_ID;
      }
    else
      {
--- 1252,1258 ----
        CHECK_NATNUM (ch);
        c = XINT (ch);
        f = XFRAME (selected_frame);
!       face_id = compute_char_face (f, 0, prop);
      }
    else
      {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]