Function: setopt--set

setopt--set is an autoloaded and byte-compiled function defined in cus-edit.el.gz.

Signature

(setopt--set VARIABLE VALUE)

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
;;;###autoload
(defun setopt--set (variable value)
  (custom-load-symbol variable)
  ;; Check that the type is correct.
  (let* ((type (get variable 'custom-type)))
    (if (not (or type (get variable 'standard-value)))
        ;; `custom-declare-variable' has not run yet.  Postpone the check.
        (push value (get variable 'custom-check-values))
      (unless (widget-apply (widget-convert type) :match value)
        (warn "Value does not match %S's type `%S': %S" variable type value))))
  (funcall (or (get variable 'custom-set) #'set-default) variable value))