all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* perhaps rephrase "misplaced interactive spec"
@ 2014-07-31 21:06 Emanuel Berg
  2014-07-31 21:21 ` Emanuel Berg
  2014-08-21 19:55 ` lee
  0 siblings, 2 replies; 4+ messages in thread
From: Emanuel Berg @ 2014-07-31 21:06 UTC (permalink / raw)
  To: help-gnu-emacs

If have a minor mode (i.e., buffer local) for caps, all
in sweet software [1]. I got it from someone else but I
modified it to auto-reset when one uppercased C
constant or acronym or whatever is typed, so you get
back to non-caps automatically.

I got the following message when otherwise successfully
and without warnings byte-compiling it:

;; caps.el ... Warning: misplaced interactive spec:
;; `(interactive (list (or current-prefix-arg (quote
;; toggle))))'

Turns out, I didn't have a docstring! As in, the second
line of:

(define-minor-mode caps-mode
  "Caps on you."
  :init-value nil
  :lighter " Caps")

After thinking my brains out over this, I see now in
the help that

(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.

Well, just a suggestion. But I think most people will
have a hard time deciphering that kind of error
message.

[1] http://user.it.uu.se/~embe8573/conf/emacs-init/caps.el

-- 
underground experts united


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

end of thread, other threads:[~2014-08-21 19:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 21:06 perhaps rephrase "misplaced interactive spec" Emanuel Berg
2014-07-31 21:21 ` Emanuel Berg
2014-07-31 22:45   ` Barry Margolin
2014-08-21 19:55 ` lee

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.