GNU bug report logs -
#52496
syntax highlighting problem on emacs shell-script mode
Previous Next
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
View this message in rfc822 format
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.