[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105071: Move Minor Modes node of Ema
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105071: Move Minor Modes node of Emacs manual next to the Major Modes node |
Date: |
Sun, 10 Jul 2011 00:05:33 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105071
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-10 00:05:33 -0400
message:
Move Minor Modes node of Emacs manual next to the Major Modes node
and out of the Customizations chapter.
* doc/emacs/modes.texi: Rename from major.texi.
(Modes): New node. Make Major Modes and Minor Modes subsections
of this. All callers changed.
* doc/emacs/custom.texi (Minor Modes): Move to modes.texi.
renamed:
doc/emacs/major.texi => doc/emacs/modes.texi
modified:
doc/emacs/ChangeLog
doc/emacs/Makefile.in
doc/emacs/custom.texi
doc/emacs/emacs.texi
doc/emacs/indent.texi
doc/emacs/mule.texi
doc/emacs/modes.texi
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2011-07-10 03:11:47 +0000
+++ b/doc/emacs/ChangeLog 2011-07-10 04:05:33 +0000
@@ -1,5 +1,13 @@
2011-07-10 Chong Yidong <address@hidden>
+ * modes.texi: Rename from major.texi.
+ (Modes): New node. Make Major Modes and Minor Modes subsections
+ of this. All callers changed.
+
+ * custom.texi (Minor Modes): Move to modes.texi.
+
+2011-07-10 Chong Yidong <address@hidden>
+
* custom.texi (Syntax): Node deleted.
* help.texi (Help Summary):
=== modified file 'doc/emacs/Makefile.in'
--- a/doc/emacs/Makefile.in 2011-03-23 03:09:55 +0000
+++ b/doc/emacs/Makefile.in 2011-07-10 04:05:33 +0000
@@ -84,7 +84,7 @@
${srcdir}/windows.texi \
${srcdir}/frames.texi \
${srcdir}/mule.texi \
- ${srcdir}/major.texi \
+ ${srcdir}/modes.texi \
${srcdir}/indent.texi \
${srcdir}/text.texi \
${srcdir}/programs.texi \
=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi 2011-07-10 03:11:47 +0000
+++ b/doc/emacs/custom.texi 2011-07-10 04:05:33 +0000
@@ -23,8 +23,6 @@
@end ifnottex
@menu
-* Minor Modes:: Each minor mode is a feature you can turn on
- independently of any others.
* Easy Customization:: Convenient way to browse and change settings.
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
@@ -35,155 +33,6 @@
@file{.emacs} file.
@end menu
address@hidden Minor Modes
address@hidden Minor Modes
address@hidden minor modes
address@hidden mode, minor
-
- Minor modes are optional features which you can turn on or off. For
-example, Auto Fill mode is a minor mode in which @key{SPC} breaks
-lines between words as you type. Minor modes are independent of one
-another and of the selected major mode. Most minor modes say in the
-mode line when they are enabled; for example, @samp{Fill} in the mode
-line means that Auto Fill mode is enabled.
-
- Each minor mode is associated with a command, called the @dfn{mode
-command}, which turns it on or off. The name of this command consists
-of the name of the minor mode, followed by @samp{-mode}; for instance,
-the mode command for Auto Fill mode is @code{auto-fill-mode}. Calling
-the minor mode command with no prefix argument @dfn{toggles} the mode,
-turning it on if it was off, and off if it was on. A positive
-argument always turns the mode on, and a zero or negative argument
-always turns it off. Mode commands are usually invoked with
address@hidden, but you can bind keys to them if you wish (@pxref{Key
-Bindings}).
-
- Most minor modes also have a @dfn{mode variable}, with the same name
-as the mode command. Its value is address@hidden if the mode is
-enabled, and @code{nil} if it is disabled. In some minor modes---but
-not all---the value of the variable alone determines whether the mode
-is active: the mode command works simply by setting the variable, and
-changing the value of the variable has the same effect as calling the
-mode command. Because not all minor modes work this way, we recommend
-that you avoid changing the mode variables directly; use the mode
-commands instead.
-
- Some minor modes are @dfn{buffer-local}: they apply only to the
-current buffer, so you can enable the mode in certain buffers and not
-others. Other minor modes are @dfn{global}: while enabled, they
-affect everything you do in the Emacs session, in all buffers. Some
-global minor modes are enabled by default.
-
- The following is a list of some buffer-local minor modes:
-
address@hidden @bullet
address@hidden
-Abbrev mode automatically expands text based on pre-defined
-abbreviation definitions. @xref{Abbrevs}.
-
address@hidden
-Auto Fill mode inserts newlines as you type to prevent lines from
-becoming too long. @xref{Filling}.
-
address@hidden
-Auto Save mode saves the buffer contents periodically to reduce the
-amount of work you can lose in case of a crash. @xref{Auto Save}.
-
address@hidden
-Enriched mode enables editing and saving of formatted text.
address@hidden Text}.
-
address@hidden
-Flyspell mode automatically highlights misspelled words.
address@hidden
-
address@hidden
-Font-Lock mode automatically highlights certain textual units found in
-programs. It is enabled globally by default, but you can disable it
-in individual buffers. @xref{Faces}.
-
address@hidden linum-mode
address@hidden Linum mode
address@hidden
-Linum mode displays each line's line number in the window's left
-margin. Its mode command is @code{linum-mode}.
-
address@hidden
-Outline minor mode provides similar facilities to the major mode
-called Outline mode. @xref{Outline Mode}.
-
address@hidden Overwrite mode
address@hidden mode, Overwrite
address@hidden overwrite-mode
address@hidden INSERT
address@hidden
-Overwrite mode causes ordinary printing characters to replace existing
-text instead of shoving it to the right. For example, if point is in
-front of the @samp{B} in @samp{FOOBAR}, then in Overwrite mode typing
-a @kbd{G} changes it to @samp{FOOGAR}, instead of producing
address@hidden as usual. In Overwrite mode, the command @kbd{C-q}
-inserts the next character whatever it may be, even if it is a
-digit---this gives you a way to insert a character instead of
-replacing an existing character. The mode command,
address@hidden, is bound to the @key{Insert} key.
-
address@hidden binary-overwrite-mode
address@hidden
-Binary Overwrite mode is a variant of Overwrite mode for editing
-binary files; it treats newlines and tabs like other characters, so
-that they overwrite other characters and can be overwritten by them.
-In Binary Overwrite mode, digits after @kbd{C-q} specify an octal
-character code, as usual.
-
address@hidden
-Visual Line mode performs ``word wrapping'', causing long lines to be
-wrapped at word boundaries. @xref{Visual Line Mode}.
address@hidden itemize
-
- Here are some useful global minor modes. Since Line Number mode and
-Transient Mark mode can be enabled or disabled just by setting the
-value of the minor mode variable, you @emph{can} set them differently
-for particular buffers, by explicitly making the corresponding
-variable local in those buffers. @xref{Locals}.
-
address@hidden @bullet
address@hidden
-Column Number mode enables display of the current column number in the
-mode line. @xref{Mode Line}.
-
address@hidden
-Delete Selection mode causes text insertion to first delete the text
-in the region, if the region is active. @xref{Using Region}.
-
address@hidden
-Icomplete mode displays an indication of available completions when
-you are in the minibuffer and completion is active. @xref{Completion
-Options}.
-
address@hidden
-Line Number mode enables display of the current line number in the
-mode line. It is enabled by default. @xref{Mode Line}.
-
address@hidden
-Menu Bar mode gives each frame a menu bar. It is enabled by default.
address@hidden Bars}.
-
address@hidden
-Scroll Bar mode gives each window a scroll bar. It is enabled by
-default, but the scroll bar is only displayed on graphical terminals.
address@hidden Bars}.
-
address@hidden
-Tool Bar mode gives each frame a tool bar. It is enabled by default,
-but the tool bar is only displayed on graphical terminals. @xref{Tool
-Bars}.
-
address@hidden
-Transient Mark mode highlights the region, and makes many Emacs
-commands operate on the region when the mark is active. It is enabled
-by default. @xref{Mark}.
address@hidden itemize
-
@node Easy Customization
@section Easy Customization Interface
=== modified file 'doc/emacs/emacs.texi'
--- a/doc/emacs/emacs.texi 2011-07-10 03:11:47 +0000
+++ b/doc/emacs/emacs.texi 2011-07-10 04:05:33 +0000
@@ -184,7 +184,7 @@
* International:: Using address@hidden character sets.
Advanced Features
-* Major Modes:: Text mode vs. Lisp mode vs. C mode...
+* Modes:: Major and minor modes alter Emacs' basic behavior.
* Indentation:: Editing the white space at the beginnings of lines.
* Text:: Commands and modes for editing English.
* Programs:: Commands and modes for editing programs.
@@ -549,9 +549,12 @@
to use without multibyte characters.
* Charsets:: How Emacs groups its internal character codes.
-Major Modes
+Modes
-* Choosing Modes:: How major modes are specified or chosen.
+* Major Modes:: Text mode vs. Lisp mode vs. C mode...
+* Minor Modes:: Each minor mode is a feature you can turn on
+ independently of any others.
+* Choosing Modes:: How modes are chosen when visiting files.
Indentation
@@ -1058,8 +1061,6 @@
Customization
-* Minor Modes:: Each minor mode is a feature you can turn on
- independently of any others.
* Easy Customization:: Convenient way to browse and change settings.
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
@@ -1485,7 +1486,7 @@
@include windows.texi
@include frames.texi
@include mule.texi
address@hidden major.texi
address@hidden modes.texi
@include indent.texi
@include text.texi
@c Includes fortran-xtra.
=== modified file 'doc/emacs/indent.texi'
--- a/doc/emacs/indent.texi 2011-01-25 04:08:28 +0000
+++ b/doc/emacs/indent.texi 2011-07-10 04:05:33 +0000
@@ -2,7 +2,7 @@
@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
address@hidden Indentation, Text, Major Modes, Top
address@hidden Indentation, Text, Modes, Top
@chapter Indentation
@cindex indentation
@cindex tabs
=== renamed file 'doc/emacs/major.texi' => 'doc/emacs/modes.texi'
--- a/doc/emacs/major.texi 2011-07-10 03:11:47 +0000
+++ b/doc/emacs/modes.texi 2011-07-10 04:05:33 +0000
@@ -2,35 +2,67 @@
@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
address@hidden Major Modes, Indentation, International, Top
address@hidden Major Modes
address@hidden Modes, Indentation, International, Top
address@hidden Editing Modes
+
+ Emacs contains many @dfn{editing modes}, each of which alters its
+basic behavior in useful ways. These are divided into @dfn{major
+modes} and @dfn{minor modes}.
+
+ Major modes provide specialized facilities for working on a
+particular file type, such as a C source file (@pxref{Programs}), or a
+particular type of non-file buffer, such as a shell buffer
+(@pxref{Shell}). Major modes are mutually exclusive; each buffer has
+one and only one major mode at any time.
+
+ Minor modes are optional features which you can turn on or off, not
+necessarily specific to a type of file or buffer. For example, Auto
+Fill mode is a minor mode in which @key{SPC} breaks lines between
+words as you type (@pxref{Auto Fill}). Minor modes are independent of
+one another, and of the selected major mode.
+
address@hidden
+* Major Modes:: Text mode vs. Lisp mode vs. C mode...
+* Minor Modes:: Each minor mode is a feature you can turn on
+ independently of any others.
+* Choosing Modes:: How modes are chosen when visiting files.
address@hidden menu
+
address@hidden Major Modes
address@hidden Major Modes
@cindex major modes
@cindex mode, major
@kindex TAB @r{(and major modes)}
@kindex DEL @r{(and major modes)}
@kindex C-j @r{(and major modes)}
- Emacs provides many alternative @dfn{major modes}, each of which
-customizes Emacs for editing text of a particular sort. The major modes
-are mutually exclusive, and each buffer has one major mode at any time.
-The mode line normally shows the name of the current major mode, in
-parentheses (@pxref{Mode Line}).
+ Every buffer possesses a major mode, which determines the editing
+behavior of Emacs while that buffer is current. The mode line
+normally shows the name of the current major mode, in parentheses.
address@hidden Line}.
+
+ Usually, the major mode is automatically set by Emacs, when you
+first visit a file or create a buffer. @xref{Choosing Modes}. You
+can explicitly select a new major mode by using an @kbd{M-x} command.
+Take the name of the mode and add @code{-mode} to get the name of the
+command to select that mode. Thus, you can enter Lisp mode with
address@hidden lisp-mode}.
The least specialized major mode is called @dfn{Fundamental mode}.
This mode has no mode-specific redefinitions or variable settings, so
that each Emacs command behaves in its most general manner, and each
-user option variable is in its default state. For editing text of a
-specific type that Emacs knows about, such as Lisp code or English
-text, you should switch to the appropriate major mode, such as Lisp
-mode or Text mode.
+user option variable is in its default state.
- Selecting a major mode changes the meanings of a few keys to become
-more specifically adapted to the language being edited. The ones that
-are changed frequently are @key{TAB}, @key{DEL}, and @kbd{C-j}. The
-prefix key @kbd{C-c} normally contains mode-specific commands. In
-addition, the commands which handle comments use the mode to determine
-how comments are to be delimited. Many major modes redefine the
-syntactical properties of characters appearing in the buffer.
+ For editing text of a specific type that Emacs knows about, such as
+Lisp code or English text, you typically use a more specialized major
+mode, such as Lisp mode or Text mode. Such major modes change the
+meanings of some keys to become more specifically adapted to the
+language being edited. The ones that are commonly changed are
address@hidden, @key{DEL}, and @kbd{C-j}. The prefix key @kbd{C-c}
+normally contains mode-specific commands. In addition, the commands
+which handle comments use the mode to determine how comments are to be
+delimited. Many major modes redefine the syntactical properties of
+characters appearing in the buffer.
The major modes fall into three major groups. The first group
contains modes for normal text, either plain or with mark-up. It
@@ -52,37 +84,176 @@
because most lines in a program are usually indented
(@pxref{Indentation}).
address@hidden
-* Choosing Modes:: How major modes are specified or chosen.
address@hidden menu
-
address@hidden Choosing Modes,,Major Modes,Major Modes
address@hidden How Major Modes are Chosen
address@hidden Minor Modes
address@hidden Minor Modes
address@hidden minor modes
address@hidden mode, minor
+
+ A minor mode is an optional editing modes that alters the behavior
+of Emacs in some well-defined way. Unlike major modes, any number of
+minor modes can be in effect at any time. Some minor modes are
address@hidden: they apply only to the current buffer, so you can
+enable the mode in certain buffers and not others. Other minor modes
+are @dfn{global}: while enabled, they affect everything you do in the
+Emacs session, in all buffers. Some global minor modes are enabled by
+default.
+
+ Most minor modes say in the mode line when they are enabled, just
+after the major mode indicator. For example, @samp{Fill} in the mode
+line means that Auto Fill mode is enabled. @xref{Mode Line}.
+
+ Each minor mode is associated with a command, called the @dfn{mode
+command}, which turns it on or off. The name of this command consists
+of the name of the minor mode, followed by @samp{-mode}; for instance,
+the mode command for Auto Fill mode is @code{auto-fill-mode}. Calling
+the minor mode command with no prefix argument @dfn{toggles} the mode,
+turning it on if it was off, and off if it was on. A positive
+argument always turns the mode on, and a zero or negative argument
+always turns it off. Mode commands are usually invoked with
address@hidden, but you can bind keys to them if you wish (@pxref{Key
+Bindings}).
+
+ Most minor modes also have a @dfn{mode variable}, with the same name
+as the mode command. Its value is address@hidden if the mode is
+enabled, and @code{nil} if it is disabled. In some minor modes---but
+not all---the value of the variable alone determines whether the mode
+is active: the mode command works simply by setting the variable, and
+changing the value of the variable has the same effect as calling the
+mode command. Because not all minor modes work this way, we recommend
+that you avoid changing the mode variables directly; use the mode
+commands instead.
+
+ The following is a list of some buffer-local minor modes:
+
address@hidden @bullet
address@hidden
+Abbrev mode automatically expands text based on pre-defined
+abbreviation definitions. @xref{Abbrevs}.
+
address@hidden
+Auto Fill mode inserts newlines as you type to prevent lines from
+becoming too long. @xref{Filling}.
+
address@hidden
+Auto Save mode saves the buffer contents periodically to reduce the
+amount of work you can lose in case of a crash. @xref{Auto Save}.
+
address@hidden
+Enriched mode enables editing and saving of formatted text.
address@hidden Text}.
+
address@hidden
+Flyspell mode automatically highlights misspelled words.
address@hidden
+
address@hidden
+Font-Lock mode automatically highlights certain textual units found in
+programs. It is enabled globally by default, but you can disable it
+in individual buffers. @xref{Faces}.
+
address@hidden linum-mode
address@hidden Linum mode
address@hidden
+Linum mode displays each line's line number in the window's left
+margin. Its mode command is @code{linum-mode}.
+
address@hidden
+Outline minor mode provides similar facilities to the major mode
+called Outline mode. @xref{Outline Mode}.
+
address@hidden Overwrite mode
address@hidden mode, Overwrite
address@hidden overwrite-mode
address@hidden INSERT
address@hidden
+Overwrite mode causes ordinary printing characters to replace existing
+text instead of shoving it to the right. For example, if point is in
+front of the @samp{B} in @samp{FOOBAR}, then in Overwrite mode typing
+a @kbd{G} changes it to @samp{FOOGAR}, instead of producing
address@hidden as usual. In Overwrite mode, the command @kbd{C-q}
+inserts the next character whatever it may be, even if it is a
+digit---this gives you a way to insert a character instead of
+replacing an existing character. The mode command,
address@hidden, is bound to the @key{Insert} key.
+
address@hidden binary-overwrite-mode
address@hidden
+Binary Overwrite mode is a variant of Overwrite mode for editing
+binary files; it treats newlines and tabs like other characters, so
+that they overwrite other characters and can be overwritten by them.
+In Binary Overwrite mode, digits after @kbd{C-q} specify an octal
+character code, as usual.
+
address@hidden
+Visual Line mode performs ``word wrapping'', causing long lines to be
+wrapped at word boundaries. @xref{Visual Line Mode}.
address@hidden itemize
+
+ Here are some useful global minor modes. Since Line Number mode and
+Transient Mark mode can be enabled or disabled just by setting the
+value of the minor mode variable, you @emph{can} set them differently
+for particular buffers, by explicitly making the corresponding
+variable local in those buffers. @xref{Locals}.
+
address@hidden @bullet
address@hidden
+Column Number mode enables display of the current column number in the
+mode line. @xref{Mode Line}.
+
address@hidden
+Delete Selection mode causes text insertion to first delete the text
+in the region, if the region is active. @xref{Using Region}.
+
address@hidden
+Icomplete mode displays an indication of available completions when
+you are in the minibuffer and completion is active. @xref{Completion
+Options}.
+
address@hidden
+Line Number mode enables display of the current line number in the
+mode line. It is enabled by default. @xref{Mode Line}.
+
address@hidden
+Menu Bar mode gives each frame a menu bar. It is enabled by default.
address@hidden Bars}.
+
address@hidden
+Scroll Bar mode gives each window a scroll bar. It is enabled by
+default, but the scroll bar is only displayed on graphical terminals.
address@hidden Bars}.
+
address@hidden
+Tool Bar mode gives each frame a tool bar. It is enabled by default,
+but the tool bar is only displayed on graphical terminals. @xref{Tool
+Bars}.
+
address@hidden
+Transient Mark mode highlights the region, and makes many Emacs
+commands operate on the region when the mark is active. It is enabled
+by default. @xref{Mark}.
address@hidden itemize
+
address@hidden Choosing Modes
address@hidden Choosing File Modes
@cindex choosing a major mode
- You can select a major mode explicitly for the current buffer, but
-most of the time Emacs determines which mode to use based on the file
-name or on special text in the file.
-
- To explicitly select a new major, you use an @kbd{M-x} command.
-Take the name of a major mode and add @code{-mode} to get the name of
-the command to select that mode. Thus, you can enter Lisp mode by
-executing @kbd{M-x lisp-mode}.
-
address@hidden choosing a minor mode
@vindex auto-mode-alist
- When you visit a file, Emacs usually chooses the right major mode
-automatically. Normally, it makes the choice based on the file
-name---for example, files whose names end in @samp{.c} are normally
-edited in C mode---but sometimes it chooses the major mode based on
-the contents of the file. Here is the exact procedure:
-
- First, Emacs checks whether the file contains a file-local variable
-that specifies the major mode. If so, it uses that major mode,
-ignoring all other criteria. @xref{File Variables}. There are
-several methods to specify a major mode using a file-local variable;
-the simplest is to put the mode name in the first nonblank line,
-preceded and followed by @samp{-*-}. Other text may appear on the
-line as well. For example,
+ When you visit a file, Emacs chooses a major mode automatically.
+Normally, it makes the choice based on the file name---for example,
+files whose names end in @samp{.c} are normally edited in C mode---but
+sometimes it chooses the major mode based on special text in the file.
+This special text can also be used to enable buffer-local minor modes.
+
+ Here is the exact procedure:
+
+ First, Emacs checks whether the file contains file-local mode
+variables. @xref{File Variables}. If there is a file-local variable
+that specifies a major mode, then Emacs uses that major mode, ignoring
+all other criteria. There are several methods to specify a major mode
+using a file-local variable; the simplest is to put the mode name in
+the first nonblank line, preceded and followed by @samp{-*-}. Other
+text may appear on the line as well. For example,
@example
; -*-Lisp-*-
@@ -104,16 +275,19 @@
; -*- mode: Lisp; tab-width: 4; -*-
@end example
+ If a file variable specifies a buffer-local minor mode, Emacs
+enables that minor mode in the buffer.
+
@vindex interpreter-mode-alist
- Second, Emacs checks whether the file's contents begin with
address@hidden If so, that indicates that the file can serve as an
-executable shell command, which works by running an interpreter named
-on the file's first line (the rest of the file is used as input to the
-interpreter). Therefore, Emacs tries to use the interpreter name to
-choose a mode. For instance, a file that begins with
address@hidden/usr/bin/perl} is opened in Perl mode. The variable
address@hidden specifies the correspondence between
-interpreter program names and major modes.
+ Second, if there is no file variable specifying a major mode, Emacs
+checks whether the file's contents begin with @samp{#!}. If so, that
+indicates that the file can serve as an executable shell command,
+which works by running an interpreter named on the file's first line
+(the rest of the file is used as input to the interpreter).
+Therefore, Emacs tries to use the interpreter name to choose a mode.
+For instance, a file that begins with @samp{#!/usr/bin/perl} is opened
+in Perl mode. The variable @code{interpreter-mode-alist} specifies
+the correspondence between interpreter program names and major modes.
When the first line starts with @samp{#!}, you usually cannot use
the @samp{-*-} feature on the first line, because the system would get
=== modified file 'doc/emacs/mule.texi'
--- a/doc/emacs/mule.texi 2011-07-01 17:59:15 +0000
+++ b/doc/emacs/mule.texi 2011-07-10 04:05:33 +0000
@@ -1,7 +1,7 @@
@c This is part of the Emacs manual.
@c Copyright (C) 1997, 1999-2011 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
address@hidden International, Major Modes, Frames, Top
address@hidden International, Modes, Frames, Top
@chapter International Character Set Support
@c This node is referenced in the tutorial. When renaming or deleting
@c it, the tutorial needs to be adjusted. (TUTORIAL.de)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105071: Move Minor Modes node of Emacs manual next to the Major Modes node,
Chong Yidong <=