unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 37938@debbugs.gnu.org
Subject: bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML
Date: Tue, 29 Oct 2019 12:54:15 +0100	[thread overview]
Message-ID: <87ftjb22e0.fsf@gnus.org> (raw)
In-Reply-To: <87r22w8ite.5.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Tue, 29 Oct 2019 09:02:53 +0800")

積丹尼 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	other threads:[~2019-10-29 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27  0:14 bug#37938: electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML 積丹尼 Dan Jacobson
2019-10-28 15:35 ` Lars Ingebrigtsen
2019-10-29  1:02   ` 積丹尼 Dan Jacobson
2019-10-29 11:54     ` Lars Ingebrigtsen [this message]
2019-10-29 13:56       ` Dmitry Gutov
2019-10-29 21:24         ` Lars Ingebrigtsen

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=87ftjb22e0.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37938@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    /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).