1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-09 01:05:39 -08:00

(mouse-kill-secondary): Avoid changing this-command.

Don't clear the secondary selection.
This commit is contained in:
Richard M. Stallman 1995-02-26 04:17:42 +00:00
parent 63c1d3f28c
commit 9dfab550e6

View file

@ -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)