Function: var:remove

var:remove is a byte-compiled function defined in hvar.el.

Signature

(var:remove VAR-SYMBOL LIST-TO-REMOVE)

Documentation

Remove from VAR-SYMBOL the functions in LIST-TO-REMOVE.

Use to remove from hook variables.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hvar.el
(defun var:remove (var-symbol list-to-remove)
  "Remove from VAR-SYMBOL the functions in LIST-TO-REMOVE.
Use to remove from hook variables."
  (unless (symbolp var-symbol)
    (error "(var:remove): First argument, `%s', must be a symbol (not a string)" var-symbol))
  (unless (and list-to-remove (listp list-to-remove))
    (error "(var:remove): Second argument, `%s', must be a non-empty list" list-to-remove))
  (when (eq (car list-to-remove) 'lambda)
    (setq list-to-remove (list list-to-remove)))
  (mapc (lambda (func) (remove-hook var-symbol func))
	list-to-remove)
  (setq var::append-list (delete (cons var-symbol list-to-remove) var::append-list))
  (symbol-value var-symbol))