all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36501: 26.2; (elisp) `Defining Minor Modes'
@ 2019-07-04 15:33 Drew Adams
  2019-07-08 20:31 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2019-07-04 15:33 UTC (permalink / raw)
  To: 36501

The examples defining `hungry-mode', and their descriptions, don't
seem completely correct.

Unless a minor mode is declared to be global, which `hungry-mode' is
not, I don't think it defines a user option.

But this doc says:

  It puts the variable 'hungry-mode' into custom group 'hunger'.

Does that happen?  Even if I define a `hunger' group before evaluating
those `define-minor-mode' sexps I don't see that `M-x customize-group'
gets you to variable `hungry-mode'.  But I didn't test much, e.g. with
different `defgroup' definitions for group `hungry'.

My guess is that (1) `:group 'hunger' should be removed from the
examples and (2) the doc should not say that variable `hungry-mode'
is put "into custom group `hunger'.  It should not give the impression
that var `hungry-mode' is a user option.

---

I also think it's not so important to show two full examples for the
buffer-local mode, and it might be good to show an example for a global
mode - perhaps even two: (1) using `define-minor-mode' and (2) using
`define-globalized-minor-mode'.


In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





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

* bug#36501: 26.2; (elisp) `Defining Minor Modes'
  2019-07-04 15:33 bug#36501: 26.2; (elisp) `Defining Minor Modes' Drew Adams
@ 2019-07-08 20:31 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-08 20:31 UTC (permalink / raw)
  To: Drew Adams; +Cc: 36501

Drew Adams <drew.adams@oracle.com> writes:

> But this doc says:
>
>   It puts the variable 'hungry-mode' into custom group 'hunger'.
>
> Does that happen?  Even if I define a `hunger' group before evaluating
> those `define-minor-mode' sexps I don't see that `M-x customize-group'
> gets you to variable `hungry-mode'.  But I didn't test much, e.g. with
> different `defgroup' definitions for group `hungry'.

I tested a bit, and I think you're right.

> My guess is that (1) `:group 'hunger' should be removed from the
> examples and (2) the doc should not say that variable `hungry-mode'
> is put "into custom group `hunger'.  It should not give the impression
> that var `hungry-mode' is a user option.

I've now done so.

> I also think it's not so important to show two full examples for the
> buffer-local mode, and it might be good to show an example for a global
> mode - perhaps even two: (1) using `define-minor-mode' and (2) using
> `define-globalized-minor-mode'.

The two examples are demonstrations of the short, non-explicit form and
the longer, explicit forms, so I think that's useful.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-07-08 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-04 15:33 bug#36501: 26.2; (elisp) `Defining Minor Modes' Drew Adams
2019-07-08 20:31 ` Lars Ingebrigtsen

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.