Commit aade4ab2 authored by Per Bothner's avatar Per Bothner
Browse files

(term-mouse-paste): Make work for xemacs. Minor GNU emacs fixes.

parent 5232b753
......@@ -670,12 +670,18 @@ without any interpretation."
(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-send-raw-string (or (condition-case () (x-get-selection) (error ()))
(error "No selection or cut buffer available"))))
;; 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)))))))
;; Which would be better: "\e[A" or "\eOA"? readline accepts either.
(defun term-send-up () (interactive) (term-send-raw-string "\e[A"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment