unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to define a (derived) minor mode inaccessible to the user
@ 2021-01-22  5:11 Marcin Borkowski
  2021-01-22  5:34 ` [External] : " Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Marcin Borkowski @ 2021-01-22  5:11 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hello everyone,

I'd like to define a special-purpose major mode, derived from
`special-mode', in such a way that the user cannot set it using M-x.
(It is to be called via another command.)  It seems that
`define-derived-mode' always sets the mode as `interactive'.  I tried to
define my mode using

(define-derived-mode
  my--mode
  special-mode
  "My mode")

and then did

M-: (symbol-plist 'my--mode)

expecting an `interactive-form' entry on the plist - but it was not
there.  (I wanted to remove it from the list so that it can't be called
with M-x.)

What's going on?  Is it possible to define a (derived) major mode so
that it can't be called interactively?

TIA,

--
Marcin Borkowski
http://mbork.pl



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

end of thread, other threads:[~2021-01-28 14:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-22  5:11 How to define a (derived) minor mode inaccessible to the user Marcin Borkowski
2021-01-22  5:34 ` [External] : " Drew Adams
2021-01-22 15:01   ` Marcin Borkowski
2021-01-22 14:19 ` Stefan Monnier
2021-01-22 15:23   ` Marcin Borkowski
2021-01-22 15:38     ` Stefan Monnier
2021-01-28  7:42       ` Marcin Borkowski
2021-01-28 14:31         ` Stefan Monnier
2021-01-23 13:08 ` Michael Heerdegen
2021-01-28  7:45   ` Marcin Borkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).