[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to define a (derived) minor mode inaccessible to the user
From: |
Marcin Borkowski |
Subject: |
How to define a (derived) minor mode inaccessible to the user |
Date: |
Fri, 22 Jan 2021 06:11:51 +0100 |
User-agent: |
mu4e 1.1.0; emacs 28.0.50 |
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
- How to define a (derived) minor mode inaccessible to the user,
Marcin Borkowski <=
Re: How to define a (derived) minor mode inaccessible to the user, Michael Heerdegen, 2021/01/23