unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Roland Winkler <winkler@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: joostkremers@fastmail.fm, 68477@debbugs.gnu.org
Subject: bug#68477: 29.1; bibtex-braced-string-syntax-table should handle non-ASCII parentheses
Date: Fri, 03 Jan 2025 08:23:48 -0600	[thread overview]
Message-ID: <87ttagc6x7.fsf@gnu.org> (raw)
In-Reply-To: <86bjwoien5.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Jan 2025 08:40:30 +0200")

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.)





      reply	other threads:[~2025-01-03 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 16:43 bug#68477: 29.1; bibtex-braced-string-syntax-table should handle non-ASCII parentheses Joost Kremers
2025-01-02 19:09 ` Roland Winkler
2025-01-02 20:13   ` Eli Zaretskii
2025-01-02 20:58     ` Roland Winkler
2025-01-03  6:40       ` Eli Zaretskii
2025-01-03 14:23         ` Roland Winkler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttagc6x7.fsf@gnu.org \
    --to=winkler@gnu.org \
    --cc=68477@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joostkremers@fastmail.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).