[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis
From: |
Stephen Berman |
Subject: |
bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis |
Date: |
Mon, 12 Oct 2020 19:21:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Mon, 12 Oct 2020 19:29:07 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: Stephen Berman <stephen.berman@gmx.net>, jidanni@jidanni.org,
>> 43941@debbugs.gnu.org
>> Date: Mon, 12 Oct 2020 18:17:41 +0200
>>
>> >> But the face does not change if `(' is used instead of `(', e.g. copy
>> >> the following two lines into a buffer and type `M-x html-mode' (or `M-x
>> >> mhtml-mode', the face change appears in both):
>> >
>> > So which of them is a bug?
>>
>> In the context of the OP it seems clear that string face is wrong. So
>> in my simpler example, that means the display of the second line
>> containing FULLWIDTH LEFT PARENTHESIS is buggy.
>
> Do the ASCII parentheses have some syntactic significance in this
> context, then? If not, why do the parentheses affect the meaning of
> the apostrophe?
It seems they do have some syntactic significance, since the following
patch prevents string face in the examples with FULLWIDTH LEFT
PARENTHESIS:
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index f3d8695e24..92a2215ed7 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -193,7 +193,7 @@ sgml-mode-syntax-table
(defconst sgml-tag-syntax-table
(let ((table (sgml-make-syntax-table sgml-specials)))
- (dolist (char '(?\( ?\) ?\{ ?\} ?\[ ?\] ?$ ?% ?& ?* ?+ ?/))
+ (dolist (char '(?\( ?\) ?\{ ?\} ?\[ ?\] ?$ ?% ?& ?* ?+ ?/ ?())
(modify-syntax-entry char "." table))
(unless (memq ?' sgml-specials)
;; Avoid that skipping a tag backwards skips any "'" prefixing it.
If this is the right approach, then all such characters would have to be
added, or is there a better alternative?
Steve Berman
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, 積丹尼 Dan Jacobson, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Eli Zaretskii, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, 積丹尼 Dan Jacobson, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Stephen Berman, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Eli Zaretskii, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Stephen Berman, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Eli Zaretskii, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis,
Stephen Berman <=
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Eli Zaretskii, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Stephen Berman, 2020/10/12
- bug#43941: HTML+ mode: dangerous apostrophe after fullwidth parenthesis, Stephen Berman, 2020/10/13