From: "Drew Adams" <drew.adams@oracle.com>
To: "'David Kastrup'" <dak@gnu.org>, <emacs-devel@gnu.org>
Subject: RE: Updated proposal for DEL to delete active region
Date: Sat, 22 May 2010 15:14:11 -0700 [thread overview]
Message-ID: <E3D3B6FB46A94896BAE5041B60233686@us.oracle.com> (raw)
In-Reply-To: <871vd3mx9z.fsf@lola.goethe.zz>
> >> Why not just attach a property to any existing command
> >> symbols that you want to become sensitive to this new
> >> feature? That's the way `delete-selection-mode' does
> >> this sort of thing.
>
> You could read up on the corresponding discussion. Tying special
> behavior to symbols rather than functions is a bad idea.
I read the discussion at the time. Hard-coding behavior the way that was
proposed is a worse idea.
With the proposal, any command that you might want to use in place of the new
`delete-(back|for)ward' commands will need to hard-code the same behavior they
have in order to take account of the new option `delete-deletes-active-region'.
IOW, the proposal would purportedly add flexibility by having an option to
define the alternative behaviors, but overall it would take away flexibility by
hard-coding the behavior that makes use of that option. The option is
made-to-order for those two new commands, and vice versa. Nothing flexible about
it.
That option-respecting behavior should be factored out and made easily
applicable (attachable, hookable, whatever) to any command you like.
If you do not like the mechanism for such loose and easy coupling to be simply
putting a property on a command symbol - (put 'delete-char 'delete-selection
'supersede), then provide another simple and elegant mechanism. What's your
proposal - defadvice?
Hard-coding the behavior and replacing (only two of) the existing char-deletion
commands is not the answer.
(When can we expect the same approach to be used to transform thingatpt.el?)
next prev parent reply other threads:[~2010-05-22 22:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-22 17:44 Updated proposal for DEL to delete active region Chong Yidong
2010-05-22 18:37 ` Drew Adams
2010-05-22 19:02 ` Eli Zaretskii
2010-05-22 20:43 ` Drew Adams
2010-05-22 21:39 ` David Kastrup
2010-05-22 22:14 ` Drew Adams [this message]
2010-05-22 21:37 ` David Kastrup
2010-05-22 23:40 ` Chong Yidong
2010-05-23 0:30 ` Drew Adams
2010-05-23 17:10 ` Andreas Schwab
2010-05-24 21:03 ` Stefan Monnier
2010-05-23 1:33 ` Stefan Monnier
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=E3D3B6FB46A94896BAE5041B60233686@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=dak@gnu.org \
--cc=emacs-devel@gnu.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).