]> git.eshelyaron.com Git - emacs.git/commitdiff
Make mouse-2 respect delete-selection mode
authorVisuwesh <visuweshm@gmail.com>
Mon, 11 Jul 2022 10:57:34 +0000 (12:57 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 11 Jul 2022 10:58:48 +0000 (12:58 +0200)
* lisp/delsel.el: Make the mouse yank commands delete-selection-mode
aware (bug#56421).

lisp/delsel.el

index 5310328e5fd834ef9898029e7d29853f1ab7682c..723a52b17d483fb4fa8686a4dffda3e14ec4e517 100644 (file)
@@ -300,6 +300,9 @@ to `delete-selection-mode'."
 (put 'yank-pop 'delete-selection 'yank)
 (put 'yank-from-kill-ring 'delete-selection 'yank)
 (put 'clipboard-yank 'delete-selection 'yank)
+(put 'mouse-yank-primary 'delete-selection 'yank)
+(put 'mouse-yank-secondary 'delete-selection 'yank)
+(put 'mouse-yank-at-click '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.