From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Anders Lindgren <andlind@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Regarding Emacs, js.el, template-strings and syntax-tables
Date: Tue, 29 Aug 2017 09:36:47 -0400 [thread overview]
Message-ID: <jwvziaifqqp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CABr8ebbui7JArWe-__maxSk9YKUvRuZJ19V30PmkFHtHS8iRwQ@mail.gmail.com> (Anders Lindgren's message of "Thu, 24 Aug 2017 17:19:05 +0200")
>> 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=gammaset alpha_beta=gamma
> 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 “<<” are treated as heredoc comments", but AFAIK
>> this should only happen in fairly old versions of Emacs.
> I see this in Emacs 25.1, for example:
>
> echo "<<test"
> 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 <<STRING, so we add "^STRING$" to the syntactic
;; font-lock keywords to detect the end of this here document.
next prev parent reply other threads:[~2017-08-29 13:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 6:56 Regarding Emacs, js.el, template-strings and syntax-tables Jostein Kjønigsen
2017-08-24 10:53 ` Stefan Monnier
2017-08-24 12:13 ` Jostein Kjønigsen
2017-08-24 12:17 ` Jostein Kjønigsen
2017-08-24 13:47 ` Stefan Monnier
2017-08-24 14:04 ` Stefan Monnier
2017-08-24 12:31 ` Anders Lindgren
2017-08-24 14:20 ` Stefan Monnier
2017-08-27 16:37 ` Dmitry Gutov
2017-08-24 14:22 ` Stefan Monnier
2017-08-24 15:19 ` Anders Lindgren
2017-08-29 13:36 ` Stefan Monnier [this message]
2017-08-29 13:49 ` Anders Lindgren
2017-08-30 2:22 ` Richard Stallman
2017-09-01 12:14 ` Anders Lindgren
2017-09-04 23:40 ` Dmitry Gutov
2017-09-05 7:00 ` Anders Lindgren
2017-09-05 8:25 ` Dmitry Gutov
2017-09-05 9:30 ` Anders Lindgren
2017-09-05 9:53 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvziaifqqp.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=andlind@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.