From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 2/2] Make font-lock honor parents mode of current major-mode Date: Thu, 10 Feb 2011 10:25:42 +0100 Message-ID: <87d3n0w8a1.fsf@keller.adm.naquadah.org> References: <1297190593-4585-1-git-send-email-julien@danjou.info> <1297190593-4585-2-git-send-email-julien@danjou.info> <87ei7hw2mk.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1297329984 9101 80.91.229.12 (10 Feb 2011 09:26:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Feb 2011 09:26:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 10 10:26:18 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PnSn2-00034V-J7 for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2011 10:26:16 +0100 Original-Received: from localhost ([127.0.0.1]:36280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnSn6-0000Xi-Um for ged-emacs-devel@m.gmane.org; Thu, 10 Feb 2011 04:26:20 -0500 Original-Received: from [140.186.70.92] (port=43668 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnSn0-0000VW-Fd for emacs-devel@gnu.org; Thu, 10 Feb 2011 04:26:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnSmu-00006E-DW for emacs-devel@gnu.org; Thu, 10 Feb 2011 04:26:09 -0500 Original-Received: from prometheus.naquadah.org ([212.85.154.174]:54592 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnSmu-000067-67 for emacs-devel@gnu.org; Thu, 10 Feb 2011 04:26:08 -0500 Original-Received: by mx1.naquadah.org (Postfix, from userid 8) id 065385C1EF; Thu, 10 Feb 2011 10:26:07 +0100 (CET) Original-Received: from keller.adm.naquadah.org (keller.adm.naquadah.org [192.168.2.16]) by mx1.naquadah.org (Postfix) with ESMTP id 705D45C166; Thu, 10 Feb 2011 10:25:45 +0100 (CET) Mail-Followup-To: Stefan Monnier , emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Wed, 09 Feb 2011 16:47:42 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.85.154.174 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135835 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=20=20=20 '(("\\<\\(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. =2D-=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJNU68XAAoJEGEbqVCLeKXCMoYQAIwD/t6UIVKTU0c2rbXWM5WR 2buFnpXnYhy/rWiUd48mCkvwAmtqeP0Z/K06zObwxtGgghCftjn1Ip+FNIii1Q2f XY/XqdqJjc4ICDGQgB985unsvEaceR0pvhWZhWG2q8pG3dLs9+lE45+x8gTmH/RN SxkKpFcAAMA4u5pss33ILok+BrPwSW4VkzW2efQZP19yd17P4RRrfnqZH4gX3nQF XevuDHF6IXzDYIZy6Q3JcGzBl/HLzyk0tYj7z9tH2b+GnI3VSxh/9/B2CHmvHn1D jPIXGzJEpzy57wI2zZ5k/MzBd702asnseE/xGxQul8AA4IurqWMKBUa7GHWEJqhL 2z1dW9pBPRt6/09O4ZXikFUQrQiFokNrNjq5bPXQMmHyrOmTDVhaxUcv6QU+LXVP jncaQyUP2GHhcdJqJZZH7mdfhYyEHIw5TGNj2y9t1b7sQObWH65xeZ1pVoRPfFjq Mnepk2+shiAdrI601uj9KTiQ7kkSmdD92FFmo0hsesL8IIErP1Kb+0bgZZpuJv9i KgfJursS26NpWsYvv3U5PqaZeaOmzyVDEhDY0LZ+MFGDgTqh6zdKFWz0VGxe3M6Q 95pX60Z+diwd1uKbAayt3/qYfPqq//0jKAwX/IROnl7Y01pbgCIoD5B/gT84fUNy 85dzA9dpUIYVA028bUD1 =Z+fk -----END PGP SIGNATURE----- --=-=-=--