Subject: bug#78291: [PATCH] Add new gv place definitions

From: Zach Shaftel <[email-masked]>
Date: Tue, 06 May 2025 23:45:10 -0400

Tags: patch

just a few simple gv definitions. also fixed the return on the
`terminal-parameter' gv, since `set-terminal-parameter' returns the
previous value of the parameter instead of the new one.

In GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2025-04-30 built on bigbox
Repository revision: dd5ae0f3ba56e762ae1265b0cb0fe9f2a28281ec
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --with-modules --without-xwidgets --with-native-compilation
 --with-tree-sitter --without-gsettings --without-gconf --without-gpm
 --with-pgtk --without-compress-install 'CFLAGS=-mtune=native
 -march=native -O2 -g''

>From de63c30a0e239817c48698c1fc7f5a793620cdcf Mon Sep 17 00:00:00 2001
From: Zach Shaftel <[email-masked]>
Date: Tue, 6 May 2025 22:07:41 -0400
Subject: [PATCH] Add new gv place definitions

* lisp/emacs-lisp/gv.el (char-table-extra-slot, char-table-parent)
(default-toplevel-value, marker-insertion-type, process-plist)
(process-query-on-exit-flag, process-thread, lookup-key)
(window-prev-buffers, window-next-buffers, window-new-normal, font-get)
(charset-plist, get-charset-property): Add gv-setters.
(terminal-parameter): Fix the return value.
---
 lisp/emacs-lisp/gv.el | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 6c949f1016b..1e540926e4a 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -367,6 +367,8 @@ 'gv-place
 
 (gv-define-simple-setter aref aset)
 (gv-define-simple-setter char-table-range set-char-table-range)
+(gv-define-simple-setter char-table-extra-slot set-char-table-extra-slot)
+(gv-define-simple-setter char-table-parent set-char-table-parent)
 (gv-define-simple-setter car setcar)
 (gv-define-simple-setter cdr setcdr)
 ;; FIXME: add compiler-macros for `cXXr' instead!
@@ -400,10 +402,12 @@ symbol-value
 ;;; Elisp-specific generalized variables.
 
 (gv-define-simple-setter default-value set-default)
+(gv-define-simple-setter default-toplevel-value set-default-toplevel-value t)
 (gv-define-simple-setter frame-parameter set-frame-parameter 'fix)
-(gv-define-simple-setter terminal-parameter set-terminal-parameter)
+(gv-define-simple-setter terminal-parameter set-terminal-parameter t)
 (gv-define-simple-setter keymap-parent set-keymap-parent)
 (gv-define-simple-setter match-data set-match-data 'fix)
+(gv-define-simple-setter marker-insertion-type set-marker-insertion-type)
 (gv-define-simple-setter overlay-get overlay-put)
 (gv-define-setter overlay-start (store ov)
   (macroexp-let2 nil store store
@@ -415,6 +419,9 @@ process-buffer
 (gv-define-simple-setter process-filter set-process-filter)
 (gv-define-simple-setter process-sentinel set-process-sentinel)
 (gv-define-simple-setter process-get process-put 'fix)
+(gv-define-simple-setter process-plist set-process-plist)
+(gv-define-simple-setter process-query-on-exit-flag set-process-query-on-exit-flag)
+(gv-define-simple-setter process-thread set-process-thread)
 (gv-define-simple-setter window-parameter set-window-parameter)
 (gv-define-setter window-buffer (v &optional w)
   (macroexp-let2 nil v v
@@ -427,6 +434,14 @@ window-dedicated-p
 (gv-define-setter window-hscroll (v &optional w) `(set-window-hscroll ,w ,v))
 (gv-define-setter window-point (v &optional w) `(set-window-point ,w ,v))
 (gv-define-setter window-start (v &optional w) `(set-window-start ,w ,v))
+(gv-define-setter window-prev-buffers (v &optional w) `(set-window-prev-buffers ,w ,v))
+(gv-define-setter window-next-buffers (v &optional w) `(set-window-next-buffers ,w ,v))
+(gv-define-setter window-new-normal (v &optional w) `(set-window-new-normal ,w ,v))
+(gv-define-simple-setter font-get font-put)
+(gv-define-simple-setter charset-plist set-charset-plist)
+(gv-define-simple-setter get-charset-property put-charset-property t)
+(gv-define-setter lookup-key (val keymap key &optional _accept-default)
+  `(define-key ,keymap ,key ,val))
 
 (gv-define-setter buffer-local-value (val var buf)
   (macroexp-let2 nil v val
-- 
2.49.0