Function: mode-local--deactivate-bindings

mode-local--deactivate-bindings is a byte-compiled function defined in mode-local.el.gz.

Signature

(mode-local--deactivate-bindings &optional MODE)

Documentation

Deactivate variables defined locally in MODE and its parents.

That is, kill buffer local variables set from the corresponding mode local bindings. If MODE is not specified it defaults to current major-mode.

Aliases

deactivate-mode-local-bindings (obsolete since 27.1)

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/mode-local.el.gz
(defun mode-local--deactivate-bindings (&optional mode)
  "Deactivate variables defined locally in MODE and its parents.
That is, kill buffer local variables set from the corresponding mode
local bindings.
If MODE is not specified it defaults to current `major-mode'."
  (unless mode
    (kill-local-variable 'mode-local--init-mode)
    (setq mode major-mode))
  (let (table)
    (while mode
      (when (setq table (get mode 'mode-local-symbol-table))
        (mapatoms
         (lambda (var)
           (when (get var 'mode-variable-flag)
             (kill-local-variable (intern (symbol-name var)))))
         table))
      (setq mode (get-mode-local-parent mode)))))