From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Font-lock of comments using comment tokens, does it work? Date: Wed, 03 Jun 2015 15:11:43 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433358924 19980 80.91.229.3 (3 Jun 2015 19:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jun 2015 19:15:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 03 21:15:23 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z0E8H-0006ZQ-Hy for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Jun 2015 21:15:21 +0200 Original-Received: from localhost ([::1]:37341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0E8G-0005Nl-QX for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Jun 2015 15:15:20 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Injection-Info: mx02.eternal-september.org; posting-host="7d373ed72892ee578c208d3ba2c61e92"; logging-data="12069"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19iNkW9q3hTii3jZS1XD8UL" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:fDHYh9mCi2QwZ48Cq/oGt97RAn4= sha1:0gUFLw2w/w+/x9yOIv5TikyYRY8= Original-Xref: usenet.stanford.edu gnu.emacs.help:212453 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104736 Archived-At: > I have a really complicated font-locking problem I'm trying to solve > for a major mode. It's like I've tried everything but nothing > works. Here is the question I asked on Stack Overflow and got some > help with but it didn't go all the way: The answer there gives you the technique to use. AFAICT you only need to adjust the regexp he used in exmark-syntax-propertize. You'll want to read about syntax-tables in the Elisp manual to understand what the "_" means in that function (for a quick refresher on which char means what, C-h f modify-syntax-entry RET is what I use, but you first need to read the Elisp reference to really understand how that works). Stefan