all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: goncholden <goncholden@protonmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: using keyword arguments in define-minor-mode
Date: Fri, 04 Feb 2022 12:38:34 +0100	[thread overview]
Message-ID: <87h79ehncd.fsf@gnu.org> (raw)
In-Reply-To: <CdjyTgkOXScvWyWV2lTJ6w6luGGt8XBR4N1DyKj_RRIO4Tf6V4n5rDuB3PkZcV7k3oKlbEj-XNxx_8VrFeBDJtMe6YzYtjfBpIz-tgdtwlU=@protonmail.com>

goncholden via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

> Been advised against the long obsolete form for define-minor-mode, but
> using keyword arguments instead. But need some examples. Particularly
> for indicating in the mode-line.
>
> (define-minor-mode rich-minor-mode
> "docstring"

Have a look at `C-h f define-minor-mode' which explains those keyword
arguments.

(define-minor-mode my-super-mode
  "This is the docstring."
  :lighter "ModeLineIndicator"
  ...)

Bye,
Tassilo



  reply	other threads:[~2022-02-04 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 11:10 using keyword arguments in define-minor-mode goncholden via Users list for the GNU Emacs text editor
2022-02-04 11:38 ` Tassilo Horn [this message]
2022-02-04 11:51   ` goncholden
2022-02-04 12:52     ` Tassilo Horn
2022-02-06  8:58       ` Kevin Vigouroux via Users list for the GNU Emacs text editor

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=87h79ehncd.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=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.