bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like


From: Lars Ingebrigtsen
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Date: Tue, 29 Oct 2019 12:54:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

>>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
>
> LI> Anybody know what's that about?
>
> In emacs-version "26.3" I get Foo'', no error.
>
> LI> I'm not quite sure, but I think Dan is saying that the ' character
> LI> shouldn't be a paired character in html-mode since it isn't in
> LI> text-mode.  And that sounds reasonable.  Does anybody object to making
> LI> that change?
>
> Sounds good.

I know nothing about electric pair mode, but it seems that the behaviour
is down to the syntax class of the ' character.

(elt (syntax-table) ?\')
=> (7 . 39)

And

7              string quote           15             generic string

which makes sense, because you can have

<a foo='bar'>

and in that context it's definitely a quote character.  But when you're
typing text in HTML, then it's not.

mhtml already has support for different syntaxes in CSS/JS/HTML -- is
there a way to switch the syntax table when in tags and when not?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]