help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: perhaps rephrase "misplaced interactive spec"


From: Barry Margolin
Subject: Re: perhaps rephrase "misplaced interactive spec"
Date: Thu, 31 Jul 2014 18:45:19 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <87iomdusvs.fsf@debian.uxu>,
 Emanuel Berg <embe8573@student.uu.se> wrote:

> Emanuel Berg <embe8573@student.uu.se> writes:
> 
> > (define-minor-mode MODE DOC ...
> >
> > so I wonder why I just didn't get a
> > wrong-number-of-arguments? That would have instantly
> > made it clear.
> 
> Aha, now I see, it is because of those others :property
> arguments. So it is more complicated.
> 
> Is the reason for having those (:some thing) that some
> can be provided, and others left out? Is that
> implemented function-by-function (like a C binary or
> shell function that has to decode what options were
> passed)?
> 
> (define-minor-mode MODE DOC &optional INIT-VALUE
> LIGHTER KEYMAP &rest BODY)
> 
> Although it was more complicated than I thought, that
> doesn't make the warning message any more clear...
> Especially since it works just fine (the minor mode)
> without the docstring it gets even more confusing.

This type of thing tends to happen when functions and macros evolve over 
time. Probably the original definition was just

(define-minor-mode MODE DOC &rest BODY)

Then someone decided to add options, and the most obvious place to add 
them was before the BODY.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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