GNU bug report logs -
#43941
HTML+ mode: dangerous apostrophe after fullwidth parenthesis
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Mon, 12 Oct 2020 05:12:01 UTC
Severity: minor
Tags: confirmed, patch
Merged with 40844,
46312
Found in versions 26.3, 27.0.91
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 43941 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, 12 Oct 2020 19:29:07 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: Stephen Berman <stephen.berman <at> gmx.net>, jidanni <at> jidanni.org,
>> 43941 <at> 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:
[Message part 2 (text/x-patch, inline)]
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.
[Message part 3 (text/plain, inline)]
If this is the right approach, then all such characters would have to be
added, or is there a better alternative?
Steve Berman
This bug report was last modified 4 years and 35 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.