Subject: Re: bug#68477: 29.1; bibtex-braced-string-syntax-table should handle non-ASCII parentheses

From: Roland Winkler <[email-masked]>
Date: Fri, 03 Jan 2025 08:23:48 -0600

On Fri, Jan 03 2025, Eli Zaretskii wrote:
> Please elaborate on "treat these extra parentheses as punctuation".

bibtex-braced-string-syntax-table gives curly braces the syntax of
parenthesis characters using

    (modify-syntax-entry ?\{ "(}" st)
    (modify-syntax-entry ?\} "){" st)

but square and round parentheses are treated as punctuation using

    (modify-syntax-entry ?\[ "." st)
    (modify-syntax-entry ?\] "." st)
    (modify-syntax-entry ?\( "." st)
    (modify-syntax-entry ?\) "." st)

The goal is to do the latter with all non-ascii parentheses.

> Also, does map-char-table provide you with the means to do what is
> needed for bibtex?  Syntax table is a char-table, so if you want to do
> something with all the characters of a certain syntax, you can do that
> using map-char-table, I think.

Thanks, yes, map-char-table should be exactly what is needed for
bibtex-braced-string-syntax-table: for any non-ascii character where
char-syntax says it belongs to the syntax class of parenthesis
characters, its syntax needs to be changed to punctuation.

(When I was looking for a solution I had checked the section on syntax
tables in the elisp manual.  But map-char-table is obviously in the
section on character tables.)