]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid a custom-variable-type error (bug#27363)
authorGlenn Morris <rgm@gnu.org>
Mon, 19 Jun 2017 18:53:47 +0000 (14:53 -0400)
committerGlenn Morris <rgm@gnu.org>
Mon, 19 Jun 2017 18:53:47 +0000 (14:53 -0400)
* lisp/cus-edit.el (custom-variable-type):
Avoid an error due to plist-put becoming stricter of late.

lisp/cus-edit.el

index ca6b8a38d995b30cc94d3c3f974c263ca2de4b95..6dbb45ec6b97f1158f7178e907b8aef3918c20e0 100644 (file)
@@ -2518,7 +2518,10 @@ try matching its doc string against `custom-guess-doc-alist'."
                  (copy-sequence type)
                (list type))))
     (when options
-      (widget-put tmp :options options))
+      ;; This used to use widget-put, but with strict plists that
+      ;; fails when type is an even-length list, eg (repeat character).
+      ;; Passing our result through widget-convert makes it a valid widget.
+      (setcdr tmp (append (list :options options) (cdr tmp))))
     tmp))
 
 (defun custom-variable-value-create (widget)