bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16795: 24.3.50; Ctrl-D doesn't delete active region with delete-sele


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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 via email to

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