From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Simon Law <sfllaw@sfllaw.ca>
Cc: Chong Yidong <cyd@gnu.org>, 11520@debbugs.gnu.org
Subject: bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode
Date: Mon, 08 Oct 2012 18:25:00 -0400 [thread overview]
Message-ID: <jwv1uh8ppzb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CABMJL3LwPVR=u_Sfo7hBZvmfb2oOdVGprQn7ea8XTAhRjy-ZYg@mail.gmail.com> (Simon Law's message of "Sun, 15 Jul 2012 12:33:37 -0400")
> I proposed making delete-selection-pre-hook understand a function as
> one of the legitimate types. If it were a function, it gets called and
> its results would be interpreted as type, either: 'yank, 'kill,
> 'supersede, t, or nil.
> That way, electric-pair-mode can override the (put
> 'self-insert-command 'delete-selection ...) with its own function that
That's going in the right direction, but I have two problems with that:
- I don't want electric-pair-mode to decide of the whole
self-insert-command behavior. I.e. self-insert-command should have
a `delete-selection' property that is not specific to
electric-pair-mode, so that if someone implements some other
post-self-insert-hook that also interacts with
selection-selection-mode, they should be able to cooperate.
IOW, we need self-insert-command's delete-section property to be a new
function that runs a new hook on which electric-foo-mode can add their
respective function.
- this new hook should be good enough for delete-selection-mode,
obviously, but it should also be good enough for a replacement
of delete-selection-mode that works differently.
I guess the functions on that hook would mostly need to return
a boolean indicating whether they're going to make use of the region.
Stefan
next prev parent reply other threads:[~2012-10-08 22:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-19 20:07 bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Simon Law
2012-05-19 22:41 ` bug#11520: Workaround Simon Law
2012-05-20 14:54 ` bug#11520: 24.1.50; delete-selection-mode conflicts with electric-pair-mode Stefan Monnier
2012-05-20 16:31 ` Drew Adams
2012-05-21 4:19 ` Simon Law
2012-06-11 21:24 ` Simon Law
2012-07-14 5:23 ` Chong Yidong
2012-07-14 6:42 ` Simon Law
2012-07-15 14:39 ` Chong Yidong
2012-07-15 16:33 ` Simon Law
2012-07-18 12:13 ` Stefan Monnier
2012-07-18 13:55 ` Drew Adams
2012-10-08 22:25 ` Stefan Monnier [this message]
2012-10-21 23:12 ` Simon Law
2012-10-22 12:46 ` Stefan Monnier
2012-10-23 1:07 ` Simon Law
2012-10-23 15:10 ` Stefan Monnier
[not found] ` <b47bddfc-e35c-4ab2-8f4f-3e0a51bec33c@default>
2014-08-18 15:21 ` Stefan Monnier
[not found] ` <<jwvboft8hsz.fsf-monnier+emacs@gnu.org>
2014-07-24 17:34 ` Drew Adams
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=jwv1uh8ppzb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=11520@debbugs.gnu.org \
--cc=cyd@gnu.org \
--cc=sfllaw@sfllaw.ca \
/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).