From: Daniel Gröber Date: Sun, 8 Mar 2020 18:04:13 +0000 (-0400) Subject: * lisp/term/rxvt.el: Enable backeted paste and window title X-Git-Tag: emacs-28.0.90~7783 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d00df0aaf9105128d80f6e395974474cf5975499;p=emacs.git * lisp/term/rxvt.el: Enable backeted paste and window title rxvt-unicode uses the same escape sequences as xterm so just re-use the xterm functions to enable them. The `xterm-rxvt-function-map` keymap already has (define-key map "\e[200~" [xterm-paste]) so we're already handling the paste sequence and only need to enable it. Tested on rxvt-unicode version 9.22. (rxvt-set-window-title): New var. (terminal-init-rxvt): Use it; enable bracketed paste mode; run terminal-init-rxvt-hook. --- diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index ca6c468f525..31e3d6ede4f 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el @@ -26,6 +26,16 @@ (require 'term/xterm) +(defgroup rxvt nil + "(U)RXVT support." + :version "28.1" + :group 'terminals) + +(defcustom rxvt-set-window-title nil + "Whether Emacs should set window titles to an Emacs frame in RXVT." + :version "28.1" + :type 'boolean) + (defvar rxvt-function-map (let ((map (make-sparse-keymap))) (set-keymap-parent map xterm-rxvt-function-map) @@ -171,7 +181,16 @@ (xterm-register-default-colors rxvt-standard-colors) (rxvt-set-background-mode) ;; This recomputes all the default faces given the colors we've just set up. - (tty-set-up-initial-frame-faces)) + (tty-set-up-initial-frame-faces) + + ;; Unconditionally enable bracketed paste mode: terminals that don't + ;; support it just ignore the sequence. + (xterm--init-bracketed-paste-mode) + + (when rxvt-set-window-title + (xterm--init-frame-title)) + + (run-hooks 'terminal-init-rxvt-hook)) ;; rxvt puts the default colors into an environment variable ;; COLORFGBG. We use this to set the background mode in a more