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: Mon, 28 Oct 2019 16:35:56 +0100	[thread overview]
Message-ID: <87v9s8992b.fsf@gnus.org> (raw)
In-Reply-To: <87sgnfm4dk.5.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Sun, 27 Oct 2019 08:14:15 +0800")

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

> No wonder my web pages are getting filled with:
>
> Let's go to Bob's house.''
>
> But my email replies are thankfully still just:
>
> Let's go to Bob's house.
>
> Compare typing that into
>
> $ emacs -nw -Q -f electric-pair-mode /tmp/e.html vs.
> $ emacs -nw -Q -f electric-pair-mode /tmp/e.txt

When I try this I get the following backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  sgml--syntax-propertize-ppss(18)
  mhtml-syntax-propertize(7 19)
  syntax-propertize(19)
  syntax-ppss(19)
  electric-pair-syntax-info(39)
  electric-pair-post-self-insert-function()
  self-insert-command(1 39)
  funcall-interactively(self-insert-command 1 39)
  call-interactively(self-insert-command nil nil)
  command-execute(self-insert-command)

To reproduce

Open /tmp/e.html

M-x electric-pair-mode

Type

Foo'

Anybody know what's that about?

Anyway, to Dan's request:

> Neither electric-pair-mode's docsrting nor (info "(emacs) Matching")
> mention how to tell it 'hands off' for .html modes like it already knows
> for .txt modes.

I'm not quite sure, but I think Dan is saying that the ' character
shouldn't be a paired character in html-mode since it isn't in
text-mode.  And that sounds reasonable.  Does anybody object to making
that change?

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





  reply	other threads:[~2019-10-28 15:35 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 [this message]
2019-10-29  1:02   ` 積丹尼 Dan Jacobson
2019-10-29 11:54     ` Lars Ingebrigtsen
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=87v9s8992b.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).