GNU bug report logs - #52496
syntax highlighting problem on emacs shell-script mode

Previous Next

Package: emacs;

Reported by: Yilkal Argaw <yilkalargawworkneh <at> gmail.com>

Date: Wed, 15 Dec 2021 00:36:02 UTC

Severity: normal

Tags: moreinfo, patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 52496 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 52496 <at> debbugs.gnu.org, Yilkal Argaw <yilkalargawworkneh <at> gmail.com>
Subject: Re: bug#52496: syntax highlighting problem on emacs shell-script mode
Date: Sun, 19 Dec 2021 15:10:22 +0100
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> On Dez 19 2021, Lars Ingebrigtsen wrote:
>
>> Right.  I haven't real the shell documentation -- is "@" a valid heredoc
>> ... separator?
>
> Any word is.

But is @ word constituent?

It's not in sh-mode's word definition, anyway.  The following tweak
fixes this particular problem, but I have no idea whether it was what
what originally reported.

diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index c6b6f83471..01bebe4a23 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -867,7 +867,7 @@ sh-here-doc-syntax
     "\\(?:\\(?:.*[^\\\n]\\)?\\(?:\\\\\\\\\\)*\\\\\n\\)*.*")
 
   (defconst sh-here-doc-open-re
-    (concat "[^<]<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|[-/~._]\\)+\\)"
+    (concat "[^<]<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|[-/~._@]\\)+\\)"
             sh-escaped-line-re "\\(\n\\)")))
 
 (defun sh--inside-noncommand-expression (pos)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.