* bug#11946: syntax highlighting error in sh-mode
@ 2012-07-15 20:46 Thierry Volpiatto
2012-07-16 7:08 ` Thierry Volpiatto
2012-07-17 8:38 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2012-07-15 20:46 UTC (permalink / raw)
To: 11946
Hi, the following after the "#" is taken as a comment, which is wrong:
VERSION[${#VERSION[*]}]=$i
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11946: syntax highlighting error in sh-mode
2012-07-15 20:46 bug#11946: syntax highlighting error in sh-mode Thierry Volpiatto
@ 2012-07-16 7:08 ` Thierry Volpiatto
2012-07-17 8:38 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2012-07-16 7:08 UTC (permalink / raw)
To: 11946
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Hi, the following after the "#" is taken as a comment, which is wrong:
>
> VERSION[${#VERSION[*]}]=$i
Should be visible here:
#+BEGIN_SRC sh
declare -a VERSION
for i in $(ls "$PREFIX/sbin") ; do
echo -e $N')' $i
VERSION[${#VERSION[*]}]=$i
N=$(($N + 1))
done
#+END_SRC
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11946: syntax highlighting error in sh-mode
2012-07-15 20:46 bug#11946: syntax highlighting error in sh-mode Thierry Volpiatto
2012-07-16 7:08 ` Thierry Volpiatto
@ 2012-07-17 8:38 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2012-07-17 8:38 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: 11946-done
> Hi, the following after the "#" is taken as a comment, which is wrong:
> VERSION[${#VERSION[*]}]=$i
Thanks, installed the patch below in trunk to fix this problem.
Stefan
--- lisp/progmodes/sh-script.el 2012-07-10 11:51:54 +0000
+++ lisp/progmodes/sh-script.el 2012-07-17 08:19:01 +0000
@@ -1087,7 +1087,7 @@
;; metacharacters. The list of special chars is taken from
;; the single-unix spec of the shell command language (under
;; `quoting') but with `$' removed.
- ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_"))
+ ("\\(?:[^|&;<>()`\\\"' \t\n]\\|\\${\\)\\(#+\\)" (1 "_"))
;; In a '...' the backslash is not escaping.
("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote)))
;; Make sure $@ and $? are correctly recognized as sexps.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-17 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-15 20:46 bug#11946: syntax highlighting error in sh-mode Thierry Volpiatto
2012-07-16 7:08 ` Thierry Volpiatto
2012-07-17 8:38 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).