Subject: Re: bug#36317: [PATCH] Correct the name part of defun-prompt-regex in sh-script-mode

From: Ola Nilsson <[email-masked]>
Date: Mon, 24 Jun 2019 22:23:18 +0200

On Sat, Jun 22, 2019 at 6:13 AM Richard Stallman <[email-masked]> wrote:
>
> It should try to recognize anything that POSIX says is valid.
> However, rejecting something just because POSIX says it is invalid
> is a non-goal.

Ok, that makes total sense and is probably mentioned in the POSIX specification.

> Maybe shells don't support such function names.  If so, maybe the
> change not to highlight them is good -- maybe.  Highlighting erroneous
> function names might be helpful for the user.  When person runs the
> script, and gets an error, person will change the name.  Until then,
> highlighting the name during editing might still be helpful.

This is not actually about highlighting, but function navigation.
beginning-of-defun, end-of-defun, and narrow-to-defun does not
behave as expected for functions with underscores in their names.

I've sent a V2 patch.

-- 
Ola Nilsson