[Top][All Lists]

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

Re: bat-mode: Inconsistent fontification. Consider using font-lock-funct

From: Jostein Kjønigsen
Subject: Re: bat-mode: Inconsistent fontification. Consider using font-lock-function-name-face
Date: Mon, 9 Sep 2019 21:26:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0

On 9/9/19 8:10 PM, Eli Zaretskii wrote:
Cc: address@hidden
From: Jostein Kjønigsen <address@hidden>
Date: Mon, 9 Sep 2019 19:34:44 +0200

If the concept of a label is used consistently across many major-modes, maybe 
it would make sense to define
this as a first-class font-lock concept?

Basically we could have an official "font-lock-label-face" instead, which by 
default would be derived from
font-lock-constant-face. That way people who want labels to look more like 
functions can customize it on their

Would that be a better option?
I don't know, I never felt the need to distinguish them.
Thanks for your feedback Eli.

Not knowing your background, I'd hate to make assumptions, but could it be that your work mainly involves languages where a label (a pointer) and a constant (also possibly a pointer) largely represents the same thing, as it does in C?

To contrast your experience with mine, I mostly work with languages where a label and a constant represents 2 semantically different things, and mixing them in code will more often than not cause  the compiler to error out.

IMO they may be -used- similarly in some languages, but there's intrinsically nothing fundamentally similar about them outside those languages.

Even completely discounting that, I don't believe adding some additional default font-lock faces adds any considerable bloat or runtime-cost to Emacs. Or am I wrong about this?

If it doesn't, I really don't see any good argument -against- adding more semanticly accurate font-lock faces. I'm sure there are several major-modes where this can be put to good use (instead of relying on custom-faces, like bat-mode already does).

I'll admit to not following emacs-devel intimitely, so it may be that this is already a common ("done to death") discussion. If so I'd appreciate a pointer to a thread which better highlights the current  consensus wrt to font-lock faces.


reply via email to

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