From 9dfab550e65080dfbea91da014ff7a78ceea22df Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 26 Feb 1995 04:17:42 +0000 Subject: [PATCH] (mouse-kill-secondary): Avoid changing this-command. Don't clear the secondary selection. --- lisp/mouse.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 9e4c4827aaf..917cdca28a3 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -886,12 +886,13 @@ is to prevent accidents." (window-buffer (posn-window (event-start click))) (current-buffer))) (error "Select or click on the buffer where the secondary selection is"))) - (save-excursion - (set-buffer (overlay-buffer mouse-secondary-overlay)) - (kill-region (overlay-start mouse-secondary-overlay) - (overlay-end mouse-secondary-overlay))) + (let (this-command) + (save-excursion + (set-buffer (overlay-buffer mouse-secondary-overlay)) + (kill-region (overlay-start mouse-secondary-overlay) + (overlay-end mouse-secondary-overlay)))) (delete-overlay mouse-secondary-overlay) - (x-set-selection 'SECONDARY nil) +;;; (x-set-selection 'SECONDARY nil) (setq mouse-secondary-overlay nil)) (defun mouse-secondary-save-then-kill (click) -- 2.39.5