Function: delay-mode-hooks

delay-mode-hooks is a macro defined in subr.el.gz.

Signature

(delay-mode-hooks &rest BODY)

Documentation

Execute BODY, but delay any run-mode-hooks.

These hooks will be executed by the first following call to run-mode-hooks that occurs outside any delay-mode-hooks(var)/delay-mode-hooks(fun) form. Affects only hooks run in the current buffer.

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defmacro delay-mode-hooks (&rest body)
  "Execute BODY, but delay any `run-mode-hooks'.
These hooks will be executed by the first following call to
`run-mode-hooks' that occurs outside any `delay-mode-hooks' form.
Affects only hooks run in the current buffer."
  (declare (debug t) (indent 0))
  `(progn
     (make-local-variable 'delay-mode-hooks)
     (let ((delay-mode-hooks t))
       ,@body)))