GNU bug report logs - #11520
24.1.50; delete-selection-mode conflicts with electric-pair-mode

Previous Next

Package: emacs;

Reported by: Simon Law <sfllaw <at> sfllaw.ca>

Date: Sat, 19 May 2012 20:10:01 UTC

Severity: normal

Found in version 24.1.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Simon Law <sfllaw <at> sfllaw.ca>
Cc: 11520 <at> debbugs.gnu.org
Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode
Date: Sun, 20 May 2012 10:54:30 -0400
> $ emacs -Q
> M-x electric-pair-mode
> M-x delete-selection-mode
> ;; Type "a line of text""
> C-SPC
> C-a
> ;; At this point, you should have the line of text selected
> (

> Expected result:
> (a line of text)
> Actual result:
> )(

Thanks for the recipe.  I'm not sure yet how best to solve
this problem.  Basically, the issue is that delete-selection-mode
operates before the ( is processed, so it has to "guess" what ( will do.

Most likely the cleanest solution will be to add some
"delete-selection-predicates" hook that electric-pair-mode can use to
explain when to inhibit delete-selection.


        Stefan




This bug report was last modified 10 years and 359 days ago.

Previous Next


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