unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Adding functionality to a minor mode
@ 2022-02-05 10:00 goncholden via Users list for the GNU Emacs text editor
  2022-02-05 18:50 ` goncholden
  0 siblings, 1 reply; 17+ messages in thread
From: goncholden via Users list for the GNU Emacs text editor @ 2022-02-05 10:00 UTC (permalink / raw)
  To: goncholden via Users list for the GNU Emacs text editor

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)) )) )

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-02-08 22:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-05 10:00 Adding functionality to a minor mode goncholden via Users list for the GNU Emacs text editor
2022-02-05 18:50 ` goncholden
2022-02-07  0:09   ` goncholden
2022-02-07  6:00     ` Eric Abrahamsen
2022-02-07 13:56       ` goncholden
2022-02-07 18:05         ` Michael Heerdegen
2022-02-07 19:18           ` goncholden
2022-02-07 20:26             ` [External] : " Drew Adams
2022-02-07 20:38               ` goncholden
2022-02-07 20:59                 ` Drew Adams
2022-02-07 21:40             ` Michael Heerdegen
2022-02-07 22:15               ` goncholden
2022-02-07 22:26                 ` Michael Heerdegen
2022-02-08  7:41         ` Kevin Vigouroux via Users list for the GNU Emacs text editor
2022-02-08 13:27         ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-08 17:05           ` goncholden
2022-02-08 22:47             ` goncholden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).