emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/embark 5eda761 2/4: embark-export-customize-variable: C


From: ELPA Syncer
Subject: [elpa] externals/embark 5eda761 2/4: embark-export-customize-variable: Check if the variable can be properly deserialized
Date: Wed, 17 Nov 2021 11:57:20 -0500 (EST)

branch: externals/embark
commit 5eda76196989e5eff774f7f13a0405ce64aa861a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    embark-export-customize-variable: Check if the variable can be properly 
deserialized
---
 embark.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index b90a0c3..03c8495 100644
--- a/embark.el
+++ b/embark.el
@@ -2904,7 +2904,16 @@ PRED is a predicate function used to filter the items."
 
 (defun embark-export-customize-variable (variables)
   "Create a customization buffer listing VARIABLES."
-  (embark--export-customize variables "Variables" 'custom-variable #'boundp))
+  (embark--export-customize
+   variables "Variables" 'custom-variable
+   (lambda (sym)
+     (and (boundp sym)
+          (condition-case nil
+              ;; Check if variable can be properly deserialized.
+              ;; The customization widget relies on this.
+              (let ((val (symbol-value sym)))
+                (or (read (format "%S" val)) t))
+            (t nil))))))
 
 (defun embark-export-ibuffer (buffers)
   "Create an ibuffer buffer listing BUFFERS."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]