]> git.eshelyaron.com Git - emacs.git/commitdiff
Pretty print restricted sexp values too
authorMauro Aranda <maurooaranda@gmail.com>
Thu, 22 Oct 2020 12:30:13 +0000 (14:30 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 22 Oct 2020 12:30:24 +0000 (14:30 +0200)
* lisp/wid-edit.el (restricted-sexp widget): Use
widget-sexp-value-to-internal to pretty print the widget's value, when
it is a valid one (bug#7524).

lisp/wid-edit.el

index c3366b62cdb6b1d132e0b6af620ff5ae39c65e5f..009c6b4faf28274d8676d7dbdbfca9ea9a1da6a9 100644 (file)
@@ -3584,7 +3584,7 @@ To use this type, you must define :match or :match-alternatives."
   :match 'widget-restricted-sexp-match
   :value-to-internal (lambda (widget value)
                       (if (widget-apply widget :match value)
-                          (prin1-to-string value)
+                           (widget-sexp-value-to-internal widget value)
                         value)))
 
 (defun widget-restricted-sexp-match (widget value)