unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74553: [ELPA] [PATCH] register-list does not support framesets
@ 2024-11-27  2:18 Alex Bochannek
  0 siblings, 0 replies; only message in thread
From: Alex Bochannek @ 2024-11-27  2:18 UTC (permalink / raw)
  To: 74553; +Cc: Philip Kaludercic

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

Hello!

This is a follow-up to a comment I made on bug#73827. The register-list
package only supports frames, but not framesets. The below patch is not
particularly elegant, because framesets are saved as registers as type
frameset-register, so the frameset-p predicate does not apply here. This
is a pretty simple change and if there is a better way, I am obviously
open to it.

Also note that I did not remove support for the frame configurations. I
instead kept type "F" for both and updated the documentation. Because
neither the values of frames nor framesets can be edited, this did not
present an issue in testing.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-framesets-as-a-register-type.patch --]
[-- Type: text/x-patch, Size: 1798 bytes --]

From b5c881ef45a43b72c17dd27de2c3f9cd1c506fe1 Mon Sep 17 00:00:00 2001
From: Alex Bochannek <alex@bochannek.com>
Date: Tue, 26 Nov 2024 17:58:06 -0800
Subject: [PATCH] Add framesets as a register type

---
 register-list.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/register-list.el b/register-list.el
index 846d3efe49..435861cd32 100644
--- a/register-list.el
+++ b/register-list.el
@@ -294,9 +294,9 @@ The Key column displays the character used for this register.
 Hitting \\[register-list-call-handler-at-point] on the key will
 prompt for a replacement.
 
-The Type column displays the type of the register, either [F]rame
-\[N]umber [M]arkers [R]ectangle [S]string or [W]window.  Hitting
-\\[register-list-call-handler-at-point] on this column will
+The Type column displays the type of the register, either
+[F]rame/Frameset [N]umber [M]arkers [R]ectangle [S]tring or [W]indow.
+Hitting \\[register-list-call-handler-at-point] on this column will
 restrict the register list to this type of registers.  To quickly
 list a specific type, hit the type character among [FNMRSW].
 
@@ -466,7 +466,7 @@ the register or copy its value into the kill ring."
 		  (frame-parameter
 		   (window-configuration-frame (car value)) 'name)))
 	((string= "F" type)
-	 (format "[Frame configuration]"))
+	 (format "[Frame/Frameset configuration]"))
 	(t "[Error: unknown type]")))
 
 (defun register-list-get-type (key)
@@ -475,6 +475,7 @@ the register or copy its value into the kill ring."
       (cond ((stringp key) "S")
 	    ((markerp key) "M")
 	    ((numberp key) "N")
+	    ((equal 'frameset-register (type-of key)) "F")
 	    (t "error"))
     (cond ((window-configuration-p (car key)) "W")
 	  ((frame-configuration-p (car key)) "F")
-- 
2.39.5 (Apple Git-154)


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]


-- 
Alex.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-27  2:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27  2:18 bug#74553: [ELPA] [PATCH] register-list does not support framesets Alex Bochannek

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).