aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/term.el18
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/term.el b/lisp/term.el
index 8d0e15e09eb..e21b354a9dd 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -670,12 +670,18 @@ without any interpretation."
670(defun term-mouse-paste (click arg) 670(defun term-mouse-paste (click arg)
671 "Insert the last stretch of killed text at the position clicked on." 671 "Insert the last stretch of killed text at the position clicked on."
672 (interactive "e\nP") 672 (interactive "e\nP")
673 (mouse-set-point click) 673 (term-if-xemacs
674 (setq this-command 'yank) 674 (term-send-raw-string (or (condition-case () (x-get-selection) (error ()))
675 (term-send-raw-string (current-kill (cond 675 (x-get-cutbuffer)
676 ((listp arg) 0) 676 (error "No selection or cut buffer available"))))
677 ((eq arg '-) -1) 677 (term-ifnot-xemacs
678 (t (1- arg)))))) 678 ;; Give temporary modes such as isearch a chance to turn off.
679 (run-hooks 'mouse-leave-buffer-hook)
680 (setq this-command 'yank)
681 (term-send-raw-string (current-kill (cond
682 ((listp arg) 0)
683 ((eq arg '-) -1)
684 (t (1- arg)))))))
679 685
680;; Which would be better: "\e[A" or "\eOA"? readline accepts either. 686;; Which would be better: "\e[A" or "\eOA"? readline accepts either.
681(defun term-send-up () (interactive) (term-send-raw-string "\e[A")) 687(defun term-send-up () (interactive) (term-send-raw-string "\e[A"))