From 4e68166d77cdd0f3b84c9bf5681f6a95e51ad238 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Sat, 18 Jun 2022 19:52:31 +0300
Subject: [PATCH] Fix last tty-select-active-regions change

* lisp/frame.el (tty-select-active-regions): Pacify warning about
missing defcustom :group by specifying the same group as
select-active-regions, as well as the frames group.
* src/keyboard.c (command_loop_1, syms_of_keyboard): Rename last
occurrences of xterm-select-active-regions to
tty-select-active-regions (bug#55883).
---
 lisp/frame.el  | 2 ++
 src/keyboard.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/frame.el b/lisp/frame.el
index a6aa4475dd9..6996bb2e9c6 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2155,6 +2155,8 @@ On a text-mode terminal that supports setSelection command, if
 this variable is non-nil, Emacs will set the PRIMARY selection
 from the active region, according to `select-active-regions'.
 This is currently supported only on xterm."
+  :group 'frames
+  :group 'killing
   :version "29.1"
   :type 'boolean)
 
diff --git a/src/keyboard.c b/src/keyboard.c
index cd92cf8d4ac..e62b2e56d3d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1572,7 +1572,7 @@ command_loop_1 (void)
 		 `select-active-regions' is non-nil.  */
 	      if ((!NILP (Fwindow_system (Qnil))
 		   || ((symval =
-			find_symbol_value (Qxterm_select_active_regions),
+			find_symbol_value (Qtty_select_active_regions),
 			(!EQ (symval, Qunbound) && !NILP (symval)))
 		       && !NILP (Fterminal_parameter (Qnil,
 						      Qxterm__set_selection))))
@@ -12170,7 +12170,7 @@ syms_of_keyboard (void)
 
   DEFSYM (Qgui_set_selection, "gui-set-selection");
   DEFSYM (Qxterm__set_selection, "xterm--set-selection");
-  DEFSYM (Qxterm_select_active_regions, "xterm-select-active-regions");
+  DEFSYM (Qtty_select_active_regions, "tty-select-active-regions");
 
   /* The primary selection.  */
   DEFSYM (QPRIMARY, "PRIMARY");
-- 
2.39.5