aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Bothner1995-03-16 02:23:24 +0000
committerPer Bothner1995-03-16 02:23:24 +0000
commitaade4ab28e774bc2d74a6567aae24e805f30e78a (patch)
treeab97c8e75e84a56071d30a44b1f7736a87a51135
parent5232b7532b34915d25d9d483eb36f75d5b7dd57e (diff)
downloademacs-aade4ab28e774bc2d74a6567aae24e805f30e78a.tar.gz
emacs-aade4ab28e774bc2d74a6567aae24e805f30e78a.zip
(term-mouse-paste): Make work for xemacs. Minor GNU emacs fixes.
-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"))