all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6151: mystery arguments of define-minor-mode + describe-function
@ 2010-05-10 10:02 jidanni
  2010-05-10 10:45 ` Juanma Barranquero
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: jidanni @ 2010-05-10 10:02 UTC (permalink / raw
  To: 6151

Some describe-function results add a mystery argument ARG, not visible
in the corresponding lisp code.

Or maybe it is visible, but not to your average reader.

E.g., here's what describe-function says

    longlines-mode is an interactive compiled Lisp function in
    `longlines.el'.

    (longlines-mode &optional ARG)

    Toggle Long Lines mode.
    In Long Lines mode, long lines are wrapped if they extend beyond

And here's where we get placed when clicking on longlines.el above

    ;;;###autoload
    (define-minor-mode longlines-mode
      "Toggle Long Lines mode.
    In Long Lines mode, long lines are wrapped if they extend beyond







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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 10:02 bug#6151: mystery arguments of define-minor-mode + describe-function jidanni
@ 2010-05-10 10:45 ` Juanma Barranquero
  2010-05-10 11:39   ` Lennart Borgman
  2010-05-10 10:57 ` jidanni
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Juanma Barranquero @ 2010-05-10 10:45 UTC (permalink / raw
  To: jidanni; +Cc: 6151

On Mon, May 10, 2010 at 12:02,  <jidanni@jidanni.org> wrote:

> Some describe-function results add a mystery argument ARG, not visible
> in the corresponding lisp code.
>
> Or maybe it is visible, but not to your average reader.

Among other things, `define-minor-mode' defines a function, in this
case longlines-mode; and that function, like all minor modes, has an
arg to turn it on or off. So it's not `describe-function' which adds a
"mystery argument", but the docstring for the modes, that sometimes
lacks the relevant info.

That said, any Emacs user should be by now used to minor modes having
such an argument...

    Juanma






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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 10:02 bug#6151: mystery arguments of define-minor-mode + describe-function jidanni
  2010-05-10 10:45 ` Juanma Barranquero
@ 2010-05-10 10:57 ` jidanni
  2010-05-10 11:02   ` Juanma Barranquero
  2011-07-13 21:30 ` Lars Magne Ingebrigtsen
  2011-07-14  0:57 ` jidanni
  3 siblings, 1 reply; 9+ messages in thread
From: jidanni @ 2010-05-10 10:57 UTC (permalink / raw
  To: lekktu; +Cc: 6151

>>>>> "JB" == Juanma Barranquero <lekktu@gmail.com> writes:
JB> "mystery argument", but the docstring for the modes, that sometimes
JB> lacks the relevant info.

Perhaps an inventory should be made of these defective docstrings, and
then they should be repaired.

JB> That said, any Emacs user should be by now used to minor modes having
JB> such an argument...

I'm the dud-type user sometimes referred to in http://www.useit.com/alertbox/ .






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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 10:57 ` jidanni
@ 2010-05-10 11:02   ` Juanma Barranquero
  0 siblings, 0 replies; 9+ messages in thread
From: Juanma Barranquero @ 2010-05-10 11:02 UTC (permalink / raw
  To: jidanni; +Cc: 6151

On Mon, May 10, 2010 at 12:57,  <jidanni@jidanni.org> wrote:

> Perhaps an inventory should be made of these defective docstrings, and
> then they should be repaired.

There's such an inventory: it is called Emacs bugs list :-)

> I'm the dud-type user sometimes referred to in http://www.useit.com/alertbox/ .

That meaning?

    Juanma






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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 10:45 ` Juanma Barranquero
@ 2010-05-10 11:39   ` Lennart Borgman
  2010-05-10 15:33     ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2010-05-10 11:39 UTC (permalink / raw
  To: Juanma Barranquero; +Cc: 6151, jidanni

On Mon, May 10, 2010 at 12:45 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, May 10, 2010 at 12:02,  <jidanni@jidanni.org> wrote:
>
>> Some describe-function results add a mystery argument ARG, not visible
>> in the corresponding lisp code.
>>
>> Or maybe it is visible, but not to your average reader.
>
> Among other things, `define-minor-mode' defines a function, in this
> case longlines-mode; and that function, like all minor modes, has an
> arg to turn it on or off. So it's not `describe-function' which adds a
> "mystery argument", but the docstring for the modes, that sometimes
> lacks the relevant info.


Maybe the define-minor-mode should always add to the docstring that it
is a minor mode and provide links between the minor mod variable and
the minor mode function?






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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 11:39   ` Lennart Borgman
@ 2010-05-10 15:33     ` Stefan Monnier
  2011-07-13 21:31       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2010-05-10 15:33 UTC (permalink / raw
  To: Lennart Borgman; +Cc: Juanma Barranquero, 6151, jidanni

> Maybe the define-minor-mode should always add to the docstring that it
> is a minor mode and provide links between the minor mod variable and
> the minor mode function?

Yes, it could check the presence of "ARG" in the provided docstring or
something like that and add a standard blurb if the docstring doesn't
already have it.


        Stefan






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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 10:02 bug#6151: mystery arguments of define-minor-mode + describe-function jidanni
  2010-05-10 10:45 ` Juanma Barranquero
  2010-05-10 10:57 ` jidanni
@ 2011-07-13 21:30 ` Lars Magne Ingebrigtsen
  2011-07-14  0:57 ` jidanni
  3 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-13 21:30 UTC (permalink / raw
  To: jidanni; +Cc: 6151

jidanni@jidanni.org writes:

> Some describe-function results add a mystery argument ARG, not visible
> in the corresponding lisp code.
>
> Or maybe it is visible, but not to your average reader.
>
> E.g., here's what describe-function says
>
>     longlines-mode is an interactive compiled Lisp function in
>     `longlines.el'.
>
>     (longlines-mode &optional ARG)
>
>     Toggle Long Lines mode.
>     In Long Lines mode, long lines are wrapped if they extend beyond
>
> And here's where we get placed when clicking on longlines.el above
>
>     ;;;###autoload
>     (define-minor-mode longlines-mode
>       "Toggle Long Lines mode.
>     In Long Lines mode, long lines are wrapped if they extend beyond

I don't see a bug here -- this is how `define-minor-mode' works.

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





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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 15:33     ` Stefan Monnier
@ 2011-07-13 21:31       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-13 21:31 UTC (permalink / raw
  To: Stefan Monnier; +Cc: Juanma Barranquero, 6151, jidanni

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Maybe the define-minor-mode should always add to the docstring that it
>> is a minor mode and provide links between the minor mod variable and
>> the minor mode function?
>
> Yes, it could check the presence of "ARG" in the provided docstring or
> something like that and add a standard blurb if the docstring doesn't
> already have it.

Opening a new "wishlist" bug report for this would be appropriate.

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





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

* bug#6151: mystery arguments of define-minor-mode + describe-function
  2010-05-10 10:02 bug#6151: mystery arguments of define-minor-mode + describe-function jidanni
                   ` (2 preceding siblings ...)
  2011-07-13 21:30 ` Lars Magne Ingebrigtsen
@ 2011-07-14  0:57 ` jidanni
  3 siblings, 0 replies; 9+ messages in thread
From: jidanni @ 2011-07-14  0:57 UTC (permalink / raw
  To: larsi; +Cc: lekktu, 6151

>>>>> "LMI" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
LMI> Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Maybe the define-minor-mode should always add to the docstring that it
>>> is a minor mode and provide links between the minor mod variable and
>>> the minor mode function?
>> 
>> Yes, it could check the presence of "ARG" in the provided docstring or
>> something like that and add a standard blurb if the docstring doesn't
>> already have it.

LMI> Opening a new "wishlist" bug report for this would be appropriate.
Somebody who understands the issue please do. Even though I was the
submitter, this is all now beyond my comprehension abilities.





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

end of thread, other threads:[~2011-07-14  0:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 10:02 bug#6151: mystery arguments of define-minor-mode + describe-function jidanni
2010-05-10 10:45 ` Juanma Barranquero
2010-05-10 11:39   ` Lennart Borgman
2010-05-10 15:33     ` Stefan Monnier
2011-07-13 21:31       ` Lars Magne Ingebrigtsen
2010-05-10 10:57 ` jidanni
2010-05-10 11:02   ` Juanma Barranquero
2011-07-13 21:30 ` Lars Magne Ingebrigtsen
2011-07-14  0:57 ` jidanni

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.