emacs-devel
[Top][All Lists]
Advanced

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

Re: How to walk a Lisp_String?


From: Eli Zaretskii
Subject: Re: How to walk a Lisp_String?
Date: Fri, 02 Sep 2022 18:33:34 +0300

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: emacs-devel@gnu.org
> Date: Fri, 02 Sep 2022 16:58:22 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> [...]
> 
> > However, you still didn't answer my original question: where does the
> > face information (colors and fonts) come from?  The APIs I mention
> > above will allow you to put the information on a Lisp string, but
> > where will you get the information you need to put on those strings?
> 
> Hum, I don't know.  So far, I've initialized like this:
> --8<---------------cut here---------------start------------->8---
>   struct frame *f = XFRAME (frame);
>   struct face *face = FACE_FROM_ID (f, MENU_FACE_ID);
> --8<---------------cut here---------------end--------------->8---
> 
> And it seems to work as intended (at least for fonts).  What am I
> missing?

MENU_FACE_ID is the _basic_ face for menus, but it isn't the only
face.  By itself, it's used only for the menu bar.

See term.c:tty_menu_activate for how we set up faces for the menu
items: you will see that we use special faces for that.  You will need
either to introduce new faces for your case, or perhaps construct it
from relevant X resources.



reply via email to

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