Subject: Re: bug#24838: 26.0.50; Parse error in certain shell scripts

From: Noam Postavsky <[email-masked]>
Date: Sat, 10 Feb 2018 09:01:39 -0500

tags 24838 fixed
close 24838 27.1
quit

Philipp Stephani <[email-masked]> writes:

> Visit the following file in shell-script-mode:
>
> #!/bin/bash
>
> a="
> ("
>
> if b; then
>   c
> else
>   d
>   # '
> fi
>
> Now move point inside 'fi', and run M-x show-paren-mode.  You'll notice
> that the 'fi' is marked as syntax error, and 'if' isn't highlighted,
> indicating that the construct wasn't parsed correctly.
> Now run C-c ?.  This will cause an error "smie-indent-keyword: Wrong
> type argument: number-or-marker-p, noindent".

This is fixed in master.

[1: 14b9558752]: 2017-12-12 23:03:00 -0500
  * src/syntax.c (find_defun_start): Use syntax-ppss
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=14b95587520959c5b54356547a0a69932a9bb480