From: Julien Danjou <julien@danjou.info>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH 2/2] Make font-lock honor parents mode of current major-mode
Date: Thu, 10 Feb 2011 10:25:42 +0100 [thread overview]
Message-ID: <87d3n0w8a1.fsf@keller.adm.naquadah.org> (raw)
In-Reply-To: <jwvsjvwx4ql.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 09 Feb 2011 16:47:42 -0500")
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
On Wed, Feb 09 2011, Stefan Monnier wrote:
> If modes *add* keywords to `font-lock-new-keywords', then children of
> prog-mode will automatically inherit the prog-mode's keyword since
> variables set by the parent are carried to the child.
>
> So, I think we should change font-lock.el so that major modes setup
> font-lock keywords by adding them to a variable. For backward
> compatibility, the keywords listed in font-lock-defaults would be added,
> of course.
Just to be clean, what I was trying to fix actually is something I do in
my configuration file:
#+begin_src: emacs-lisp
(font-lock-add-keywords
'prog-mode
'(("\\<\\(FIXME\\|HACK\\|XXX\\|TODO\\)" 1 font-lock-warning-face prepend)))
#+end_src
This is not something modes do, I think. But doing that have no effect,
because font-lock does not check inheritance, therefore my patches.
--
Julien Danjou
❱ http://julien.danjou.info
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2011-02-10 9:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 18:43 [PATCH 1/2] Add new function derived-mode-parents Julien Danjou
2011-02-08 18:43 ` [PATCH 2/2] Make font-lock honor parents mode of current major-mode Julien Danjou
2011-02-09 16:37 ` Stefan Monnier
2011-02-09 17:15 ` Julien Danjou
2011-02-09 21:47 ` Stefan Monnier
2011-02-10 9:25 ` Julien Danjou [this message]
2011-02-10 18:16 ` Stefan Monnier
2011-02-08 21:12 ` [PATCH 1/2] Add new function derived-mode-parents Stefan Monnier
2011-02-08 21:19 ` Julien Danjou
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=87d3n0w8a1.fsf@keller.adm.naquadah.org \
--to=julien@danjou.info \
--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).