unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: andrewjmoreton@gmail.com, emacs-devel@gnu.org
Subject: Re: bat-mode: Inconsistent fontification. Consider using font-lock-function-name-face
Date: Mon, 9 Sep 2019 21:26:59 +0200	[thread overview]
Message-ID: <f89832b2-c37c-9096-58fd-06d09d481eed@secure.kjonigsen.net> (raw)
In-Reply-To: <83blvt2vdr.fsf@gnu.org>


On 9/9/19 8:10 PM, Eli Zaretskii wrote:
>> Cc: emacs-devel@gnu.org
>> From: Jostein Kjønigsen <jostein@secure.kjonigsen.net>
>> 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
>> end.
>>
>> 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.

--
Jostein



  reply	other threads:[~2019-09-09 19:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  8:49 bat-mode: Inconsistent fontification. Consider using font-lock-function-name-face Jostein Kjønigsen
2019-09-09 10:48 ` Andy Moreton
2019-09-09 16:09   ` Eli Zaretskii
2019-09-09 17:34     ` Jostein Kjønigsen
2019-09-09 18:10       ` Eli Zaretskii
2019-09-09 19:26         ` Jostein Kjønigsen [this message]
2019-09-09 20:32           ` Clément Pit-Claudel
2019-09-09 21:41 ` Stefan Monnier
2019-09-10  4:29   ` Jostein Kjønigsen
2019-09-10 12:48     ` Stefan Monnier
2019-09-10 14:54     ` Eli Zaretskii
2019-09-10 16:56       ` Jostein Kjønigsen
2019-09-10 18:10         ` Eli Zaretskii
2019-09-10 19:49           ` Michael Albinus
2019-09-18 19:21             ` Jostein Kjønigsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f89832b2-c37c-9096-58fd-06d09d481eed@secure.kjonigsen.net \
    --to=jostein@secure.kjonigsen.net \
    --cc=andrewjmoreton@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).