From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Major and minor modes Date: Tue, 13 Jun 2017 18:49:14 -0700 (PDT) Message-ID: <5202e0d6-4476-4e97-a5cb-f1ee66d562c3@default> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497405004 9274 195.159.176.226 (14 Jun 2017 01:50:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Jun 2017 01:50:04 +0000 (UTC) To: Jean-Christophe Helary , Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 14 03:49:58 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKxRW-0001rN-4Z for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jun 2017 03:49:58 +0200 Original-Received: from localhost ([::1]:45984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKxRY-0007cD-0y for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jun 2017 21:50:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKxR2-0007bb-Ld for help-gnu-emacs@gnu.org; Tue, 13 Jun 2017 21:49:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKxQy-0002ys-Kq for help-gnu-emacs@gnu.org; Tue, 13 Jun 2017 21:49:28 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:47491) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dKxQy-0002yZ-B3 for help-gnu-emacs@gnu.org; Tue, 13 Jun 2017 21:49:24 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5E1nJj1009640 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Jun 2017 01:49:19 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v5E1nHRq016661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Jun 2017 01:49:18 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v5E1nFn4017545; Wed, 14 Jun 2017 01:49:16 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113439 Archived-At: > > 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 wor= k > together? >=20 > 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.