Function: elint-check-setq-form
elint-check-setq-form is a byte-compiled function defined in
elint.el.gz.
Signature
(elint-check-setq-form FORM ENV)
Documentation
Lint the setq FORM in ENV.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/elint.el.gz
(defun elint-check-setq-form (form env)
"Lint the setq FORM in ENV."
(or (oddp (length form))
;; (setq foo) is valid and equivalent to (setq foo nil).
(elint-warning "Missing value in setq: %s" form))
(let ((newenv env)
sym val)
(setq form (cdr form))
(while form
(setq sym (car form)
val (car (cdr form))
form (cdr (cdr form)))
(if (symbolp sym)
(and (not (memq 'unbound-assignment elint-ignored-warnings))
(elint-unbound-variable sym newenv)
(elint-warning "Setting previously unbound symbol: %s" sym))
(elint-error "Setting non-symbol in setq: %s" sym))
(elint-form val newenv)
(if (symbolp sym)
(setq newenv (elint-env-add-var newenv sym))))
newenv))