emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-d deleting region considered harmful


From: Miles Bader
Subject: Re: C-d deleting region considered harmful
Date: Sun, 19 Sep 2010 04:09:20 +0900

Lars Magne Ingebrigtsen <address@hidden> writes:
> The "DEL deleting the region" behaviour was something that was driving
> me insane.  I usually jump around a lot with `C-x C-x' in buffers, and
> then I may want to delete something, and I use `DEL' to delete stuff
> with.
>
> So I just switched off `transient-mark-mode', which is something I
> suspect most Emacs old-timers will be more comfortable with.

I really like transient-mark-mode actually, and generally find the
"active region functionality" of most commands both useful and
intuitive.

C-d is not one of those commands, of course; really I think it's simply
too low-level a command, and the extra functionality not really a
natural extension of the basic functionality.

Hmm, it might be cute if the "active region" stuff was actually handled
by the key-binding lookup mechanism!

(global-set-key [active-region ?\C-d]
                (lambda (n beg end)
                  (interactive "p\nr")
                  (if (yes-or-no-p
                       "Do you really, really, want to delete the region?!?!?")
                     (kill-region beg end)
                    (delete-forward-char n))))

-Miles

-- 
Is it true that nothing can be known?  If so how do we know this?  -Woody Allen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]