Function: electric-indent--activate-indent-actions

electric-indent--activate-indent-actions is a byte-compiled function defined in electric.el.gz.

Signature

(electric-indent--activate-indent-actions ENABLE)

Documentation

If ENABLE is non-nil, enable the actions in electric-indent-actions.

If ENABLE is nil, disable them.

Source Code

;; Defined in /usr/src/emacs/lisp/electric.el.gz
(defun electric-indent--activate-indent-actions (enable)
  "If ENABLE is non-nil, enable the actions in `electric-indent-actions'.
If ENABLE is nil, disable them."
  (advice-remove 'yank #'electric-indent--yank-advice)
  (remove-hook 'before-save-hook #'electric-indent-save-hook)
  (when enable
    (when (memq 'yank electric-indent-actions)
      (advice-add 'yank :around #'electric-indent--yank-advice))
    (when (memq 'before-save electric-indent-actions)
      (add-hook 'before-save-hook #'electric-indent-save-hook))))