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

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

text-mode -> outline-mode -> outline-minor-mode: how does it work?


From: Thorsten Jolitz
Subject: text-mode -> outline-mode -> outline-minor-mode: how does it work?
Date: Sat, 15 Mar 2014 00:02:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi List, 

the strange title (somehow) says it all: 

Major mode outline-mode is derived from text-mode, but not very useful
in itself. outline-minor-mode is defined in outline.el and does not do
much more than defining a prefix for the outline mode map and a few
settings. 

Now imagine (text-mode) would do a lot of stuff when it is called. I think
that calling (outline-mode) would call (text-mode) first and trigger all
its initial actions, and then do its own thing. 

But what about outline-minor-mode? Does activating such a minor-mode
trigger calls to its 'twin-major-mode' (outline-mode) and its
parent-mode (text-mode) functions? If text-mode would set some buffer
local variables - would they be available in an emacs-lisp-mode buffer
with outline-minor-mode enabled?

I'm not so much interested in the details of text-mode/outline-mode but
rather in the best way to let a minor-mode inherit the functionality and
settings of a major-mode without causing a clash with the buffer's real
major-mode. 

-- 
cheers,
Thorsten





reply via email to

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