[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Adding functionality to a minor mode
From: |
goncholden |
Subject: |
Adding functionality to a minor mode |
Date: |
Sat, 05 Feb 2022 10:00:12 +0000 |
I have made a minor-mode with some defvar and defun. Have added some
functionality
for comments, and put everything in the following function definition.
(defun rich-annotation-tools ()
"Aggregates annotation tools for comments."
(rich-annotation-font-weight)
(rich-annotation-low-contrast)
(rich-annotation-keytrigger))
I would expect to add "(rich-annotation-tools)" in define-minor-mode. Would I
introduce it
within the "(when rich-minor-mode" part?
;;;###autoload
(define-minor-mode rich-minor-mode
"This is the description."
:lighter "rich" ; indicator in mode-line
(font-lock-remove-keywords nil rich-font-lock)
(when rich-minor-mode
(font-lock-add-keywords nil rich-font-lock 'append)
(set (make-local-variable 'jit-lock-contextually) t) )
(rich-annotation-tools)
(when font-lock-mode
(if (fboundp 'font-lock-flush)
(font-lock-flush)
(with-no-warnings (font-lock-fontify-buffer)) )) )
- Adding functionality to a minor mode,
goncholden <=
- Re: Adding functionality to a minor mode, goncholden, 2022/02/05
- Re: Adding functionality to a minor mode, goncholden, 2022/02/06
- Re: Adding functionality to a minor mode, Eric Abrahamsen, 2022/02/07
- Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- Re: Adding functionality to a minor mode, Michael Heerdegen, 2022/02/07
- Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- RE: [External] : Re: Adding functionality to a minor mode, Drew Adams, 2022/02/07
- RE: [External] : Re: Adding functionality to a minor mode, goncholden, 2022/02/07
- RE: [External] : Re: Adding functionality to a minor mode, Drew Adams, 2022/02/07
- Re: Adding functionality to a minor mode, Michael Heerdegen, 2022/02/07