* weird zsh script highlight
@ 2021-08-07 22:22 Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-07 22:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 2+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-07 22:22 UTC (permalink / raw)
To: help-gnu-emacs
This script is so short and simple one would think one would
be able to get it right, at least.
But no, when I put the cursor/point at positions .r.e.p.e.a.t
(full stop = position) that whole word, i.e. "repeat", is
highlighted, the face is `show-paren-mismatch' - but there is
nothing wrong with the script what I can see, yes, a2 is
defined in that file of shell functions which is sourced - and
everything works. And besides there _are_ no parenthesis? :O
The mode is "Shell-script mode defined in ‘sh-script.el’" so
that's not zsh perhaps specifically, OTOH when I dod
`revert-buffer', because of the hash bang line, it setups to
and says "Indentation setup for shell type zsh" so there is
some zsh somewhere - that where it get fontified (perhaps it
is so close to other shell scripts that's the same anyway).
repeat, a zsh shell reserved word, isn't in bash ... but it
is in ksh, does it have another syntax there that confuses it
now, perhaps?
#! /bin/zsh
#
# this file:
# https://dataswamp.org/~incal/scripts/aok-sc
. ~/public_html/conf/.zsh/apt
repeat 4 a2
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: weird zsh script highlight
2021-08-07 22:22 weird zsh script highlight Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-07 22:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-07 22:27 UTC (permalink / raw)
To: help-gnu-emacs
> #! /bin/zsh
> #
> # this file:
> # https://dataswamp.org/~incal/scripts/aok-sc
>
> . ~/public_html/conf/.zsh/apt
>
> repeat 4 a2
"repeat" is a zsh shell reserved word, try 'whence -ca repeat' or
'type repeat' (or "t", https://dataswamp.org/~incal/conf/.zsh/ide
lines 69-105)
There is no repeat in bash but there is one in ksh, perhaps
that has another syntax than in zsh because in sh-mode the
"repeat" word (line 8 in this
https://dataswamp.org/~incal/scripts/aok-sc script) gets
highlighted with `show-paren-mismatch' - but no parens what
I can see and the script works...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-07 22:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 22:22 weird zsh script highlight Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-07 22:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
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.