mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 15:56:35 -04:00
(sh-font-lock-paren): Fix bug#81192
Since commit 4e1fe56e31 turned several new chars into punctuations,
they're not skipped by (skip-syntax-backward "w_") any more,
so we need to skip them more explicitly instead when trying to
skip a case pattern.
* lisp/progmodes/sh-script.el (sh-font-lock-paren): Skip more
punctuation chars.
* test/lisp/progmodes/sh-script-resources/sh-indents.erts
(sh-indents-case-pattern-bug#81192): New test.
This commit is contained in:
parent
b5119ab920
commit
b65f8ef93d
|
|
@ -1037,7 +1037,7 @@ subshells can nest."
|
|||
;; Skip through one pattern
|
||||
(while
|
||||
(or (/= 0 (skip-syntax-backward "w_"))
|
||||
(/= 0 (skip-chars-backward "-$=?[]*@/\\\\"))
|
||||
(/= 0 (skip-chars-backward "-$=?[]*@/\\\\!%:.^~,"))
|
||||
(and (sh-is-quoted-p (1- (point)))
|
||||
(goto-char (- (point) 2)))
|
||||
(when (memq (char-before) '(?\" ?\' ?\}))
|
||||
|
|
|
|||
|
|
@ -49,3 +49,16 @@ Name: sh-indents5
|
|||
for i do echo 1; done
|
||||
for i; do echo 1; done
|
||||
=-=-=
|
||||
|
||||
Name: sh-indents-case-pattern-bug#81192
|
||||
|
||||
=-=
|
||||
case "$1" in
|
||||
a:b)
|
||||
echo "a b"
|
||||
;;
|
||||
*,*)
|
||||
echo "other"
|
||||
;;
|
||||
esac
|
||||
=-=-=
|
||||
|
|
|
|||
Loading…
Reference in a new issue