From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.bugs Subject: bug#23465: 25.0.93; `lambda' after hash-quote not highlighted as keyword Date: Wed, 11 May 2016 17:02:23 +0200 Message-ID: References: <83zirxc22i.fsf@gnu.org> <56d56c19-466b-9aaa-c7a3-18c95c848091@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d1418395dbd05329254f0 X-Trace: ger.gmane.org 1462979092 20311 80.91.229.3 (11 May 2016 15:04:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 May 2016 15:04:52 +0000 (UTC) Cc: Dmitry Gutov , 23465@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 11 17:04:42 2016 Return-path: Envelope-to: geb-bug-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 1b0Vgl-00059N-IJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 May 2016 17:04:39 +0200 Original-Received: from localhost ([::1]:52780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Vgk-00043t-9i for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 May 2016 11:04:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0VfJ-0001BT-VW for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 11:03:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0VfC-0001fe-Iv for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 11:03:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0VfC-0001fa-Gm for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 11:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b0VfC-0002Nd-Ah for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 11:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 May 2016 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23465 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23465-submit@debbugs.gnu.org id=B23465.14629789509108 (code B ref 23465); Wed, 11 May 2016 15:03:02 +0000 Original-Received: (at 23465) by debbugs.gnu.org; 11 May 2016 15:02:30 +0000 Original-Received: from localhost ([127.0.0.1]:47549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Vef-0002Mq-QB for submit@debbugs.gnu.org; Wed, 11 May 2016 11:02:29 -0400 Original-Received: from mail-vk0-f51.google.com ([209.85.213.51]:33944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Vee-0002Me-UL for 23465@debbugs.gnu.org; Wed, 11 May 2016 11:02:29 -0400 Original-Received: by mail-vk0-f51.google.com with SMTP id m188so60524608vka.1 for <23465@debbugs.gnu.org>; Wed, 11 May 2016 08:02:28 -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; bh=PXRxhPeG30HEAwuvP5aM6zd61316wUpN3EKTGS8rDxA=; b=jx93qJQI0huJyTZ5p2gwW/0L33V36yVBwBpD9dnX1UZCmAVQsKK5mhsdO39933/SE+ BjDxHUSm/2PhfNmhrjUAukChABN/uHGc0mrfFh94VD3tqli2mSusFj67CUtgur1cikUU hkkqBeG+XmAr4/Qp6R/6COrm19vmoBvDdmm/tSOtYAaikosB2iXY9yTllJXqIhWJ+BDw 0AJnSrvKDnnWkKa6UaCbGPhjnt1WWT39v23BY/Pez8XQx0VwAigsXW9mzTJ/Jga9/H1B +6pc2C5+D2kRA1QHp+/hxa5AlLIcZeMepcHVu6xoB1SiHOt8SSYwYWLocSFEu1WJrZcG f6AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=PXRxhPeG30HEAwuvP5aM6zd61316wUpN3EKTGS8rDxA=; b=Q8iuZ7nswhwPJb+FnBmrFwHeaPbsCMxxTP8+nhASt23F8iqL8mM2smzxFoPGhA2LfC PZJSPInUoJp8TlcT5ZU7V0H7BNy2jxgYIJxd+bkBSbHf1XvkTczRR9y26oL01OszTq2a o+yvpULwd+/UkVydz/MMLfINBnGBPrnDu7emomE6Z34+IMdfx5LOn+8sdQeJGwQ7lyKH 7UWeP174fWPbqY238FE+vVqETVGHBPrv9l3Z+4WMV/iMXf6EqVrOJ7mIvb96sLFntwDC +Batrg3gVt5Zb+Aoa3d2QvCCXLufDejj1svpiy9ztBFHnskNEfzC5SXlPuHwiS2ELGXC 3z1Q== X-Gm-Message-State: AOPr4FUhSZkCPdQI7cvj/xC4Ws/3pL6vUrD4F4bCUvl2Q697pbibHupXEhftCQBUX7lf4UcNnNWVFYrspqz3Sw== X-Received: by 10.159.33.240 with SMTP id 103mr1989364uac.43.1462978943209; Wed, 11 May 2016 08:02:23 -0700 (PDT) Original-Received: by 10.31.214.131 with HTTP; Wed, 11 May 2016 08:02:23 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118132 Archived-At: --001a113d1418395dbd05329254f0 Content-Type: text/plain; charset=UTF-8 Hi! > I looked at the uses of define-lex-block-type-analyzer I could > find in Emacs's trunk and they look OK to me. I also looked at the > definition of define-lex-block-type-analyzer and its highlighting also > looked fine to me. It was the definition I was referring to. (I just picked it as an example, as it uses many macros.) Anyway, I'll drop the idea (or implement it as a stand-alone package, if I ever get around to it) as it apparently didn't resonate well here. > Anyway, we're striding away from the subject here. I'll commit the fix for > > the "lambda" problem on the master branch and leave it broken on > emacs-25. > > Not sure I like this fix: it causes the `if` of #'(if bar baz) to be > highlighted even though it's not a special form nor a macro in > that position. > It is already highlighted in that context, today, even without my patch. ("if" is a special form whereas "lambda" isn't.) Also, I've looked through a lot of elisp code, and the only two uses of hash-quote I found were #'symbol and #'(lambda (...) ...). Besides, I don't mind having keywords highlighted in quoted or hash-quoted expressions. In fact, in elisp, code is often written in a quoted context, e.g. in font-lock keywords, where highlighting of special forms still makes sense. If you have a better way to handle this (e.g. making "lambda" a special form), feel free to suggest another patch. -- Anders --001a113d1418395dbd05329254f0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

> I = looked at the uses of define-lex-block-type-analyzer I could
> find in Emacs&= #39;s trunk and they look OK to me.=C2=A0 I also looked at the
> definition o= f define-lex-block-type-analyzer and its highlighting also
> looked fine to = me.

=
It was the definition I was referring= to. (I just picked it as an example, as it uses many macros.)
=

Anyway, I'll drop the idea (or implement it as a stan= d-alone package, if I ever get around to it) as it apparently didn't re= sonate well here.


> Anyway, we're striding away from the subject he= re. I'll commit the fix for
> the "lambda" problem on the master branch and leave it broke= n on emacs-25.

Not sure I like this fix: it causes the `if` of #'(if bar baz) t= o be
highlighted even though it's not a special form nor a macro in
that position.

It is already highlighte= d in that context, today, even without my patch. ("if" is a speci= al form whereas "lambda" isn't.)

Als= o, I've looked through a lot of elisp code, and the only two uses of ha= sh-quote I found were #'symbol and #'(lambda (...) ...).
=
Besides, I don't mind having keywords highlighted in quo= ted or hash-quoted expressions. In fact, in elisp, code is often written in= a quoted context, e.g. in font-lock keywords, where highlighting of specia= l forms still makes sense.

If you have a better wa= y to handle this (e.g. making "lambda" a special form), feel free= to suggest another patch.

=C2=A0 =C2=A0 -- Anders=

--001a113d1418395dbd05329254f0--