mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(term-mouse-paste): Make work for xemacs. Minor GNU emacs fixes.
This commit is contained in:
parent
5232b7532b
commit
aade4ab28e
1 changed files with 12 additions and 6 deletions
18
lisp/term.el
18
lisp/term.el
|
|
@ -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-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)))))))
|
||||
|
||||
;; Which would be better: "\e[A" or "\eOA"? readline accepts either.
|
||||
(defun term-send-up () (interactive) (term-send-raw-string "\e[A"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue