I'm defining a minor-mode not meant to be interactively activated. I'd like to use
define-minor-mode
because it's very convenient, but the downside is that it always sets
the mode function as interactive.
Is there a way to make an already-defined command non-interactive?
cider-debug-mode
actually. :-)define-minor-mode
withineasy-mode.el
, most specifically at the line of code(interactive (list (or current-prefix-arg 'toggle)))
. You may wish to consider making a new macro by copyingdefine-minor-mode
and calling it something likedefine-non-interactive-minor-mode
-- comment out the interactive statement above and implement any other additional modifications that you see fit.interactive
spec, but there apparently is none. You might consider filing an enhancement request:M-x report-emacs-bug
. (I was mistaken, I think, because my macroicicle-define-command
does accept such an optional arg. There are cases where you use the macro to define a helper function that is then used to define some commands. The helper does all the heavy lifting, and the commands that use it are wrappers that provide different contexts.)