Function: unsafep-variable

unsafep-variable is a byte-compiled function defined in unsafep.el.gz.

Signature

(unsafep-variable SYM TO-BIND)

Documentation

Return nil if SYM is safe to set or bind, or a reason why not.

If TO-BIND is nil, check whether SYM is safe to set. If TO-BIND is t, check whether SYM is safe to bind.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/unsafep.el.gz
(defun unsafep-variable (sym to-bind)
  "Return nil if SYM is safe to set or bind, or a reason why not.
If TO-BIND is nil, check whether SYM is safe to set.
If TO-BIND is t, check whether SYM is safe to bind."
  (cond
   ((not (symbolp sym))
    `(variable ,sym))
   ((risky-local-variable-p sym nil)
    `(risky-local-variable ,sym))
   ((not (or to-bind
	     (memq sym unsafep-vars)
	     (local-variable-p sym)))
    `(global-variable ,sym))))