comparison lisp/simple.el @ 17613:7dadfa677617

(set-variable): Simplify previous change.
author Richard M. Stallman <rms@gnu.org>
date Thu, 01 May 1997 17:36:50 +0000
parents d8cd49a0529c
children 9b1b6974b36f
comparison
equal deleted inserted replaced
17612:beaac591604a 17613:7dadfa677617
3033 (read 3033 (read
3034 (read-string prompt nil 3034 (read-string prompt nil
3035 'set-variable-value-history))))) 3035 'set-variable-value-history)))))
3036 (list var val))) 3036 (list var val)))
3037 3037
3038 (let ((type (get var 'custom-type)) 3038 (let ((type (get var 'custom-type)))
3039 widget)
3040 (when type 3039 (when type
3041 ;; Match with custom type. 3040 ;; Match with custom type.
3042 (require 'wid-edit) 3041 (require 'wid-edit)
3043 (unless (listp type)
3044 (setq widget (list type)))
3045 (setq type (widget-convert type)) 3042 (setq type (widget-convert type))
3046 (unless (widget-apply type :match val) 3043 (unless (widget-apply type :match val)
3047 (error "Value `%S' does not match type %S of %S" 3044 (error "Value `%S' does not match type %S of %S"
3048 val (car type) var)))) 3045 val (car type) var))))
3049 (set var val)) 3046 (set var val))