unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: master 5c70ff9: New user option 'font-lock-ignore'
Date: Sat, 02 Apr 2022 14:58:35 +0300	[thread overview]
Message-ID: <83ilrr4rys.fsf@gnu.org> (raw)
In-Reply-To: <87bkxjohrj.fsf@gmail.com> (message from Augusto Stoffel on Sat,  02 Apr 2022 13:18:40 +0200)

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: monnier@iro.umontreal.ca,  emacs-devel@gnu.org
> Date: Sat, 02 Apr 2022 13:18:40 +0200
> 
> >> The intention is that the user can write, for instance
> >> 
> >>     (setq font-lock-ignore '((prog-mode font-lock-*-face)))
> >> 
> >> and this will be equivalent to
> >> 
> >>     (setq font-lock-ignore '((prog-mode (pred (lambda (obj)
> >>                                                  (and (symbolp obj)
> >>                                                       (string-match-p
> >>                                                        "\\`font-lock-.*-face\\'"
> >>                                                        (symbol-name obj))))))))
> >> 
> >> Do you agree this is a sensible and convenient mini-language?  I guess
> >> Stefan liked the idea, at least :-).
> >
> > I understand the intent.  I'm saying that we should document this
> > "mini-language" in sufficient detail, so that Lisp programmers knew
> > how to use it.
> 
> Strictly speaking the docstring of 'font-lock-ignore' provides a
> complete specification of the mini-language; if not, it's a bug in the
> docstring.

So you want to support only the "*" wildcard and nothing else?

> >> Hum, I'm not sure I understand the fine-grained distinction your are
> >> making here.  font-lock.el speaks of "font lock keywords"; the thing
> >> that fontifies variable names with font-lock-variable-face would be a
> >> "font lock keyword" in that terminology.  I'm just following along the
> >> terminology.
> >
> > That terminology (if this is how you perceive it) is wrong, and I'm
> > about to change it to make that more clear.  font-lock-keywords are
> > not just keywords, they are rules for fontification.
> 
> I certainly agree that font-lock.el's use of "font-lock keyword" as a
> term for "rules for fontification" is a bit odd.  OTOH it's an
> established use.

That's a historic accident, AFAICT: originally we didn't support there
anything but keywords.



  reply	other threads:[~2022-04-02 11:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  6:36 master 5c70ff9: New user option 'font-lock-ignore' Eli Zaretskii
2022-04-02  7:34 ` Augusto Stoffel
2022-04-02 10:01   ` Eli Zaretskii
2022-04-02 11:18     ` Augusto Stoffel
2022-04-02 11:58       ` Eli Zaretskii [this message]
2022-04-02 12:08         ` Augusto Stoffel
2022-04-02 13:52           ` Eli Zaretskii
2022-04-02 16:25             ` Augusto Stoffel
2022-04-02 16:44               ` Eli Zaretskii
2022-04-02 16:52                 ` Augusto Stoffel
2022-04-02 14:06 ` Stefan Monnier
2022-04-02 15:28 ` [External] : " Drew Adams
2022-04-02 16:25   ` Augusto Stoffel
2022-04-02 18:45     ` Drew Adams

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=83ilrr4rys.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).