emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] Make font-lock honor parents mode of current major-mode


From: Julien Danjou
Subject: Re: [PATCH 2/2] Make font-lock honor parents mode of current major-mode
Date: Thu, 10 Feb 2011 10:25:42 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

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: pgpvKAXvXU321.pgp
Description: PGP signature


reply via email to

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