unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72068: show-paren-mode does not match Chinese parentheses correctly
@ 2024-07-12  5:03 Siyuan Chen
  2024-07-12  6:02 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Siyuan Chen @ 2024-07-12  5:03 UTC (permalink / raw)
  To: 72068

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

 Reproduce steps:

1. Emacs -Q

2. M-x eval-expression

```
(progn
  (setq cursor-type 'bar)
  (show-paren-mode 1))
```

3. Paste the following text in any .el file
```
(英文括号)
(英文 括号)
(中文括号)
(中文 括号)
```

4. Place the cursor at the first position (or last position) of each line.

The expected behavior: All of the four lines above match and highlight
correctly

The actual behavior: The 4th line mismatched. Note the middle SPC character.

P.s.

1. This issue only occurs in lisp-like modes. It is OK in c-mode and
python-mode.

2. 【】「」『』have the same problem. They are also commonly used in lisp comment.

3.  A simple investigation found that it may be related to `scan-sexps` or
syntax-table, because  `(scan-sexps outside dir)` in the
`show-paren--default` returns the wrong value in the 4th case.

4. More screenshots and test code can be found in
https://emacs-china.org/t/show-paren-mode/15160

Emacs 29.3 on Windows.

Thanks.

Best regards
Siyuan Chen

[-- Attachment #2: Type: text/html, Size: 3853 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-01  1:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12  5:03 bug#72068: show-paren-mode does not match Chinese parentheses correctly Siyuan Chen
2024-07-12  6:02 ` Eli Zaretskii
2024-07-12 12:45   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-24 20:11     ` Stefan Kangas
2024-07-25  5:20       ` Eli Zaretskii
2024-07-25 11:34         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-01  1:10           ` Dmitry Gutov

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