unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: yynyygy@gmail.com
Cc: 16795@debbugs.gnu.org
Subject: bug#16795: 24.3.50; Ctrl-D doesn't delete active region with delete-selection-mode on
Date: Tue, 18 Feb 2014 13:15:27 -0500	[thread overview]
Message-ID: <jwvha7wjnjg.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87wqgspthk.fsf@gentoo.i-did-not-set--mail-host-address--so-tickle-me> (yynyygy@gmail.com's message of "Tue, 18 Feb 2014 19:09:43 +0800")

> When delete-selection-mode is on and the region is active, Ctrl-D simply
> deletes the char under cursor while the expected behavior is deleting
> the whole region as in Emacs 24.3.

Indeed, good catch.  I install the patch below which should fix it.


        Stefan


=== modified file 'lisp/delsel.el'
--- lisp/delsel.el	2014-02-10 01:34:22 +0000
+++ lisp/delsel.el	2014-02-18 18:11:58 +0000
@@ -181,6 +181,9 @@
 (put 'yank 'delete-selection 'yank)
 (put 'clipboard-yank 'delete-selection 'yank)
 (put 'insert-register 'delete-selection t)
+;; delete-backward-char and delete-forward-char already delete the selection by
+;; default, but not delete-char.
+(put 'delete-char 'delete-selection 'supersede)
 
 (put 'reindent-then-newline-and-indent 'delete-selection t)
 (put 'newline-and-indent 'delete-selection t)






      reply	other threads:[~2014-02-18 18:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 11:09 bug#16795: 24.3.50; Ctrl-D doesn't delete active region with delete-selection-mode on yynyygy
2014-02-18 18:15 ` Stefan Monnier [this message]

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=jwvha7wjnjg.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=16795@debbugs.gnu.org \
    --cc=yynyygy@gmail.com \
    /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).