Hi
attached is a small patch for the brave. Since some of us are already
experimenting with emacs-32, I'd need your help in testing this.
I have observed that some custom variables have getter and setter
functions that do the same and thus seem redundant.
This is the case with org-latex-default-packages-alist and
org-latex-packages-alist. So I'm testing a solution where I only use the
getter function.
Since it may be possible to extrapolate this to more custom variables,
I'd ask you to test this patch and tell us if it breaks something.
All emacs version welcome :-)
Thanks a ton,
/PA
--
Pedro A. Aranda
ox-latex & ox-beamer maintainer
Sagen's Paradeiser! (ORF: Als Radiohören gefährlich war) => write BE!
IA: onomatopeya del rebuzno
2nd year of the New Koprocracy
From 436d921054259edf5c8e61d587cbc387d26912ab Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <[email protected]>
Date: Sun, 18 Oct 2026 08:15:15 +0200
Subject: [PATCH] org.el: Silence a warning for emacs-32
* lisp/org.el (org-set-packages-alist): Comment out function. We will
only use 'org-get-packages-alist' since both seem to do redundant
things.
(org-latex-default-packages-alist),
(org-latex-packages-alist): Comment out setter function and rely on the
getter function only.
emacs-32 has started to complain about variables relying on
setopt-local. This patch silences one of the messages and seems not to
destroy anything.
---
lisp/org.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 282e730b4..234e18e75 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3382,13 +3382,13 @@ (defcustom org-agenda-skip-unavailable-files nil
:group 'org-agenda
:type 'boolean)
-(defun org-set-packages-alist (var val)
- "Set the packages alist and make sure it has 3 elements per entry."
- (set-default-toplevel-value var (mapcar (lambda (x)
- (if (and (consp x) (= (length x) 2))
- (list (car x) (nth 1 x) t)
- x))
- val)))
+;; (defun org-set-packages-alist (var val)
+;; "Set the packages alist and make sure it has 3 elements per entry."
+;; (set-default-toplevel-value var (mapcar (lambda (x)
+;; (if (and (consp x) (= (length x) 2))
+;; (list (car x) (nth 1 x) t)
+;; x))
+;; val)))
(defun org-get-packages-alist (var)
"Get the packages alist and make sure it has 3 elements per entry."
@@ -3461,7 +3461,7 @@ (defcustom org-latex-default-packages-alist
A string will be inserted as-is in the header of the document."
:group 'org-latex
:group 'org-export-latex
- :set 'org-set-packages-alist
+ ;; :set 'org-set-packages-alist
:get 'org-get-packages-alist
:safe #'listp
:package-version '(Org . "9.7")
@@ -3506,7 +3506,7 @@ (defcustom org-latex-packages-alist nil
:group 'org-latex
:group 'org-export-latex
:safe #'listp
- :set 'org-set-packages-alist
+ ;; :set 'org-set-packages-alist
:get 'org-get-packages-alist
:type
'(repeat
--
2.53.0