1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-01 11:14:55 +00:00

(set-variable): Simplify previous change.

This commit is contained in:
Richard M. Stallman 1997-05-01 17:36:50 +00:00
parent 888eb98e2f
commit f8496faab6

View File

@ -3035,13 +3035,10 @@ in the definition is used to check that VALUE is valid."
'set-variable-value-history)))))
(list var val)))
(let ((type (get var 'custom-type))
widget)
(let ((type (get var 'custom-type)))
(when type
;; Match with custom type.
(require 'wid-edit)
(unless (listp type)
(setq widget (list type)))
(setq type (widget-convert type))
(unless (widget-apply type :match val)
(error "Value `%S' does not match type %S of %S"