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

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

Re: Major and minor modes


From: Krishnakant
Subject: Re: Major and minor modes
Date: Wed, 14 Jun 2017 11:51:28 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1


Read my blog at https://digitallyfreeblog.wordpress.com/

Hopefully you will get more clarity on that subject.

Happy hacking.

Krishnakant.


On Wednesday 14 June 2017 07:19 AM, Drew Adams wrote:
Can anyone explain to me clearly how Major modes and minor modes work
together. Can any minor mode work within any major mode? How do these work
together?

Everything is explained in Chapter 20 of the Emacs Manual.
Depends what Emacs version you use.  For versions 24 and 25
it is chapter 23, "Major and Minor Modes".  For version 23
it is chapter 27, "Major Modes" and section and 57.1, "Minor
Modes".  It is here:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Modes.html

In sum, a major mode is buffer-specific.
As such, it typically does something appropriate for that
buffer content.

A minor mode can be buffer-specific (local) or not (global).
Minor-mode key bindings override major-mode key bindings.
A minor mode can do anything at all.  What it does need not
be specific for the content of any particular buffer, and
hence for any particular major mode.





reply via email to

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