Function: embark-toggle-variable
embark-toggle-variable is an interactive and natively compiled
function defined in embark.el.
Signature
(embark-toggle-variable VAR &optional LOCAL)
Documentation
Toggle value of boolean variable VAR.
If prefix LOCAL is non-nil make variable local.
Key Bindings
embark-variable-map t
Source Code
;; Defined in /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-20260610.302/embark.el
(defun embark-toggle-variable (var &optional local)
"Toggle value of boolean variable VAR.
If prefix LOCAL is non-nil make variable local."
(interactive "SVariable: \nP")
(let ((val (symbol-value var)))
(unless (memq val '(nil t))
(user-error "Not a boolean variable"))
(when local
(make-local-variable var))
(funcall (or (get var 'custom-set) 'set) var (not val))))