diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 741803a5175..398a2c8946b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1042,7 +1042,9 @@ subshells can nest." ;; Maybe we've bumped into an escaped newline. (sh-is-quoted-p (point))) (backward-char 1)) - (when (eq (char-before) ?|) + (when (and + (eq (char-before) ?|) + (not (eq (char-before (1- (point))) ?\;))) (backward-char 1) t))) (and (> (point) (1+ (point-min))) (progn (backward-char 2) @@ -1053,7 +1055,7 @@ subshells can nest." ;; a normal command rather than the real `in' keyword. ;; I.e. we should look back to try and find the ;; corresponding `case'. - (and (looking-at ";[;&]\\|\\_