Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
/ hterm Public archive

Add a warning referring to the builtin OSC-52 functionality #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions etc/osc52.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
;; Use of this source code is governed by a BSD-style license that can be
;; found in the LICENSE file.
;;
;; Warning: Starting with Emacs 26, Emacs contains builtin functionality to
;; support OSC 52. Avoid loading osc52.el under Emacs 26 or later, as it will
;; stomp over that functionality. If copying to the clipboard doesn’t work out
;; of the box, customize the variable ‘xterm-extra-capabilities.’
;;
;; This script can be loaded during emacs initialization to automatically
;; send `kill-region' and `kill-ring-save' regions to your system clipboard.
;; The OSC 52 terminal escape sequence is used to transfer the selection from
Expand All @@ -18,6 +23,13 @@
;; free to submit patches.
;;

(when (>= emacs-major-version 26)
(display-warning 'osc52
(concat "Emacs supports OSC-52 natively starting with "
"Emacs 26. Loading this library should no longer "
"be necessary. Also see "
"the user option ‘xterm-extra-capabilities’.")))

(defcustom osc52-max-sequence 100000
"Maximum length of the OSC 52 sequence.

Expand Down