From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Regarding Emacs, js.el, template-strings and syntax-tables Date: Tue, 29 Aug 2017 09:36:47 -0400 Message-ID: References: <1503557767.41308.1083341824.4A2103C1@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1504013960 11882 195.159.176.226 (29 Aug 2017 13:39:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Aug 2017 13:39:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel To: Anders Lindgren Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 29 15:39:14 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmgjQ-0002Lv-26 for ged-emacs-devel@m.gmane.org; Tue, 29 Aug 2017 15:39:04 +0200 Original-Received: from localhost ([::1]:45002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmgjX-0008MQ-1T for ged-emacs-devel@m.gmane.org; Tue, 29 Aug 2017 09:39:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmghN-0007cY-QI for emacs-devel@gnu.org; Tue, 29 Aug 2017 09:36:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmghJ-0004cR-Q5 for emacs-devel@gnu.org; Tue, 29 Aug 2017 09:36:57 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:38059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmghJ-0004bh-Kb for emacs-devel@gnu.org; Tue, 29 Aug 2017 09:36:53 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v7TDaoZN032449; Tue, 29 Aug 2017 09:36:50 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 53F5A66232; Tue, 29 Aug 2017 09:36:47 -0400 (EDT) In-Reply-To: (Anders Lindgren's message of "Thu, 24 Aug 2017 17:19:05 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6104=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6104> : inlines <6039> : streams <1760692> : uri <2491614> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217875 Archived-At: >> Which version of bat-mode did you test? > The one that comes with Emacs 25.1. For example (with a custom theme to > make strings stand out): > echo this should be a string, right? > foo %alpha > foo %alpha_beta > foo "%alpha"set alpha=3Dgammaset alpha_beta=3Dgamma > foo foo.in Have you reported these as bugs? They should be easy to fix. I know nothing about the "bat" language, so I don't even know how the above *should* be parsed. >> Same question for some of the comments in the above web-page. E.g. you >> say "Strings containing =E2=80=9C<<=E2=80=9D are treated as heredoc comm= ents", but AFAIK >> this should only happen in fairly old versions of Emacs. > I see this in Emacs 25.1, for example: > > echo "< test > > I reported this over a year ago, for Emacs 25.0.93, see bug#23526. Sorry, didn't see this one (I'm not subscribed to the bugs list any more, so I only see the bugs that are Cc'd to me). I believe the patch below should fix it (should appear in trunk real-soon-now). Stefan diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 54c47b719f..9cfbb39d53 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -975,7 +975,7 @@ sh-font-lock-open-heredoc be indented (i.e. a <<- was used rather than just <<). Point is at the beginning of the next line." (unless (or (memq (char-before start) '(?< ?>)) - (sh-in-comment-or-string start) + (sh-in-comment-or-string (1+ start)) (sh--inside-noncommand-expression start)) ;; We're looking at <