From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn_Lindqvist?= Newsgroups: gmane.emacs.help Subject: Re: Font-lock of comments using comment tokens, does it work? Date: Thu, 4 Jun 2015 13:10:39 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433416658 13361 80.91.229.3 (4 Jun 2015 11:17:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Jun 2015 11:17:38 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 04 13:17:38 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 1Z0T9J-0002jb-WD for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jun 2015 13:17:26 +0200 Original-Received: from localhost ([::1]:41681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0T9I-0006PO-Un for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jun 2015 07:17:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0T2q-0004j1-Nq for help-gnu-emacs@gnu.org; Thu, 04 Jun 2015 07:10:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0T2m-0001dz-Dq for help-gnu-emacs@gnu.org; Thu, 04 Jun 2015 07:10:44 -0400 Original-Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:36112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0T2m-0001dn-7A for help-gnu-emacs@gnu.org; Thu, 04 Jun 2015 07:10:40 -0400 Original-Received: by wibdq8 with SMTP id dq8so121072231wib.1 for ; Thu, 04 Jun 2015 04:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=29hErrm9JNk/yhItKrhEKkmc7RlMHxao/ld3WrVYglw=; b=eSUjy3rWuU2DfVsqJtA/LVJjC2YmkN67npISf3HChMlJJDWaqg3p6G77jMkzys0X/O mP1/lUQU6J9IORjkM/V20laUiw3KQUVIyEu5FEMmri76Kb0QoXcahfhsgzfkmg65pw+v hx2IE9tO1UdQmCYk7kzWMRQtJWftRcXad+3gwSez0INKpA2nJ/VvEQHjH6HtF972qQvA aZuw18lsAA96mSc1bcO6eAQC/7pbqvtnffe6q77aycxdE2lBYdRkO+MswZitrXyHlP42 sHdBFeh1cK3tVQytrwtgBin3JEYqaZbaqJSshsLOtDpeJUGLh7+2kzd13EtHO/Z6aF9s KNTA== X-Received: by 10.181.27.131 with SMTP id jg3mr49987632wid.89.1433416239430; Thu, 04 Jun 2015 04:10:39 -0700 (PDT) Original-Received: by 10.194.24.167 with HTTP; Thu, 4 Jun 2015 04:10:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22a 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:104747 Archived-At: 2015-06-04 5:42 GMT+02:00 Stefan Monnier : >> If you think you know what it should be changed to, can you tell me? > > I don't know enough of the context to be sure. What extra context can I provide you with? If there is something in my problem description that is unclear I can try to explain it more precisely. > Also, as Emacs > maintainer I have enough experience/knowledge to fix most users's > problems, but if I do that I'll just end up with more users with new > problems to fix. So instead I'm better off trying to train them so they > can fix their problems themselves and even help me improve Emacs. > >> I've tried a dozen different permutations of the regexp and none of >> them produces the desired result. > > What have you tried? What/where were the undesired results? ("[a-zA-Z0-9_]\\(! \\) " (1 "_"))) ("\\(!\\)[a-zA-Z0-9_]" (1 "_"))) ("\\(! \\)[a-zA-Z0-9_]" (1 "_"))) ("[a-zA-Z0-9_]\\(!\\) " (1 "_ "))) ("[a-zA-Z0-9_]\\(!\\) " (1 " _ "))) And so on. The undesired results were incorrect font-locking of comments and regular tokens being falsely identified as comment tokens. --=20 mvh/best regards Bj=C3=B6rn Lindqvist