From: goncholden <goncholden@protonmail.com>
To: goncholden <goncholden@protonmail.com>
Cc: goncholden via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Adding functionality to a minor mode
Date: Mon, 07 Feb 2022 00:09:47 +0000 [thread overview]
Message-ID: <qJWyuN1OkKuBkkdYrdAJMnyXkegwN_RIn1kFvKtTnryGmatdLoIAK-CELzIOKK3qmTnVL_XPww-rqOAlhLyYnqTutGc44kJxjhATDFM46bY=@protonmail.com> (raw)
In-Reply-To: <xgzvaGkafUIUHOx57jFvite7PS2DQ84hO_rmZKgBlg7_f1zrIvvHgQOsGP0N5qpO73sAx6_MNUSSq1icB0RhbavkD5jBa3PTWwOOcRPV9jQ=@protonmail.com>
------ Original Message -------
On Saturday, February 5th, 2022 at 6:50 PM, goncholden <goncholden@protonmail.com> wrote:
> ------- Original Message -------
>
> On Saturday, February 5th, 2022 at 10:00 AM, goncholden via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org wrote:
>
> > 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)
> >
> > (with-no-warnings (font-lock-fontify-buffer)) )) )
Could I get some clarification for using "(when rich-minor-mode" and when not to?
next prev parent reply other threads:[~2022-02-07 0:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='qJWyuN1OkKuBkkdYrdAJMnyXkegwN_RIn1kFvKtTnryGmatdLoIAK-CELzIOKK3qmTnVL_XPww-rqOAlhLyYnqTutGc44kJxjhATDFM46bY=@protonmail.com' \
--to=goncholden@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.