commit 2d7502b55b52b9668c2c920f1bfa5bd437fb3b96 Author: Richard M. Stallman Date: Fri Jan 30 16:53:11 2004 +0000 (term-mouse-paste): Call mouse-set-point. diff --git a/lisp/term.el b/lisp/term.el --- a/lisp/term.el +++ b/lisp/term.el @@ -1163,16 +1163,17 @@ (defun term-mouse-paste (click arg) "Insert the last stretch of killed text at the position clicked on." (interactive "e\nP") (term-if-xemacs (term-send-raw-string (or (condition-case () (x-get-selection) (error ())) (x-get-cutbuffer) (error "No selection or cut buffer available")))) (term-ifnot-xemacs ;; Give temporary modes such as isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) (setq this-command 'yank) + (mouse-set-point click) (term-send-raw-string (current-kill (cond ((listp arg) 0) ((eq arg '-) -1) (t (1- arg))))))) commit aade4ab28e774bc2d74a6567aae24e805f30e78a Author: Per Bothner Date: Thu Mar 16 02:23:24 1995 +0000 (term-mouse-paste): Make work for xemacs. Minor GNU emacs fixes. diff --git a/lisp/term.el b/lisp/term.el --- a/lisp/term.el +++ b/lisp/term.el @@ -669,10 +669,16 @@ (defun term-mouse-paste (click arg) "Insert the last stretch of killed text at the position clicked on." (interactive "e\nP") - (mouse-set-point click) - (setq this-command 'yank) - (term-send-raw-string (current-kill (cond - ((listp arg) 0) - ((eq arg '-) -1) - (t (1- arg)))))) + (term-if-xemacs + (term-send-raw-string (or (condition-case () (x-get-selection) (error ())) + (x-get-cutbuffer) + (error "No selection or cut buffer available")))) + (term-ifnot-xemacs + ;; Give temporary modes such as isearch a chance to turn off. + (run-hooks 'mouse-leave-buffer-hook) + (setq this-command 'yank) + (term-send-raw-string (current-kill (cond + ((listp arg) 0) + ((eq arg '-) -1) + (t (1- arg))))))) And part of commit 4060e6ee3b796ecac506b1ca54217b100795d73a: Author: Richard M. Stallman Date: Thu Oct 13 06:30:49 1994 +0000 Initial revision diff --git a/lisp/term.el b/lisp/term.el --- /dev/null +++ b/lisp/term.el @@ -0,0 +641,10 @@ + +(defun term-mouse-paste (click arg) + "Insert the last stretch of killed text at the position clicked on." + (interactive "e\nP") + (mouse-set-point click) + (setq this-command 'yank) + (term-send-raw-string (current-kill (cond + ((listp arg) 0) + ((eq arg '-) -1) + (t (1- arg))))))