GNU bug report logs - #6335
24.0.50; doc for define-minor-mode: specify ARG

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 2 Jun 2010 22:08:02 UTC

Severity: normal

Found in version 24.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 6335-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Subject: Re: bug#6335: 24.0.50; doc for define-minor-mode: specify ARG
Date: Wed, 02 Jun 2010 21:54:43 -0400
> (cond ((integer arg) (if (> arg 0) do-foo do-fa))
>       ((consp arg) ...)
>       (arg ...)
>       (t ...))

I do not want to support this.
 
> The doc should also state clearly that the _raw prefix argument_ is used
> as ARG interactively.

It's not the case.

> Programmers can then take advantage of that fact also.  Knowing this,
> they can easily define a minor-mode command that lets users pass
> a significant value via a prefix arg.
 
And I don't want to support this either.

If people want to write functions that behave somewhat like minor modes
but with slightly different calling conventions, they can do that just
fine with `defun'.


        Stefan




This bug report was last modified 15 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.