[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filling the docstring generated by define-minor-mode

From: Juanma Barranquero
Subject: Re: Filling the docstring generated by define-minor-mode
Date: Mon, 10 Jun 2019 22:25:11 +0200

> Presumably you mean `display-fill-column-indicator-mode',
> which is even worse.

The name of the mode is display-fill-column-indicator, or Display Fill
Column Indicator. With -mode, it is the name of the mode's function,
or variable. But this is a moot point.

> If we impose that here then a user defining a minor
> mode has zero control over it.  If we don't fill
> blindly then users have control.  They can do what
> they think is best.

The mode creater has control. If you pass a doc to
'define-minor-mode', it doesn't generate one for you. But if you pass
nil, then it generates one, and you don't have control, with or
without my change. What I propose does not affect the mode creator's
control, only the formatting of an autogenerated docstring they can
opt out of ;-)

> For such generated text, I think, it's best to use
> text that doesn't require mentioning the particular
> name at all, or mentions it just once, on a separate
> line.

I'm not trying to find a better docstring. I tend to assume the
docstring used for many minor modes will have been already discussed
and agreed upon long time ago.

> The user's part of the doc string should be under
> her control, and the generated part should preferably
> not inject (i.e., %s) any text at all.  That should
> be doable, I think.

You can have all the control you want, if you write the docstring
instead of relying on autogeneration.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]