Variable: llama-fontify-mode-hook

llama-fontify-mode-hook is a customizable variable defined in llama.el.

Value

nil

Documentation

Hook run after entering or leaving llama-fontify-mode(var)/llama-fontify-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in ~/.emacs.d/elpa/llama-20260301.1253/llama.el
;;;###autoload
(define-minor-mode llama-fontify-mode
  "In Emacs Lisp mode, highlight the `##' macro and its special arguments."
  :lighter llama-fontify-mode-lighter
  :global t
  (cond
    (llama-fontify-mode
     (advice-add 'lisp--el-match-keyword :override
                 #'lisp--el-match-keyword@llama '((depth . -80)))
     (advice-add 'elisp-mode-syntax-propertize :override
                 #'elisp-mode-syntax-propertize@llama)
     (add-hook 'emacs-lisp-mode-hook #'llama--add-font-lock-keywords))
    (t
     (advice-remove 'lisp--el-match-keyword
                    #'lisp--el-match-keyword@llama)
     (advice-remove 'elisp-mode-syntax-propertize
                    #'elisp-mode-syntax-propertize@llama)
     (remove-hook 'emacs-lisp-mode-hook #'llama--add-font-lock-keywords)))
  (dolist (buffer (buffer-list))
    (with-current-buffer buffer
      (when (derived-mode-p 'emacs-lisp-mode)
        (if llama-fontify-mode
            (font-lock-add-keywords  nil llama-font-lock-keywords)
          (font-lock-remove-keywords nil llama-font-lock-keywords))
        (font-lock-flush)))))