GNU bug report logs - #37938
electric-pair-mode vs. U+0027 APOSTROPHE in mixed modes like HTML

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 27 Oct 2019 03:23:02 UTC

Severity: minor

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 37938 <at> 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
積丹尼 Dan Jacobson <jidanni <at> 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




This bug report was last modified 5 years and 233 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.