[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99623: Improve documentation for set
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99623: Improve documentation for setting buffer-local vars (Bug#5688). |
Date: |
Sat, 06 Mar 2010 14:02:49 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99623
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2010-03-06 14:02:49 -0500
message:
Improve documentation for setting buffer-local vars (Bug#5688).
* custom.texi (Init Examples): Add xref to Locals.
* major.texi (Choosing Modes): Mention usage of setq-default for
setting the default value of major-mode (Bug#5688).
modified:
doc/emacs/ChangeLog
doc/emacs/custom.texi
doc/emacs/major.texi
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2010-03-02 22:56:36 +0000
+++ b/doc/emacs/ChangeLog 2010-03-06 19:02:49 +0000
@@ -1,3 +1,10 @@
+2010-03-06 Chong Yidong <address@hidden>
+
+ * custom.texi (Init Examples): Add xref to Locals.
+
+ * major.texi (Choosing Modes): Mention usage of setq-default for
+ setting the default value of major-mode (Bug#5688).
+
2010-03-02 Chong Yidong <address@hidden>
* frames.texi (Mouse Avoidance): Mention make-pointer-invisible.
=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi 2010-02-01 18:39:33 +0000
+++ b/doc/emacs/custom.texi 2010-03-06 19:02:49 +0000
@@ -2256,9 +2256,10 @@
@end example
This sets the default value, which is effective in all buffers that do
-not have local values for the variable. Setting @code{case-fold-search}
-with @code{setq} affects only the current buffer's local value, which
-is not what you probably want to do in an init file.
+not have local values for the variable (@pxref{Locals}). Setting
address@hidden with @code{setq} affects only the current
+buffer's local value, which is probably not what you want to do in an
+init file.
@item
@vindex user-mail-address
=== modified file 'doc/emacs/major.texi'
--- a/doc/emacs/major.texi 2010-01-13 08:35:10 +0000
+++ b/doc/emacs/major.texi 2010-03-06 19:02:49 +0000
@@ -196,17 +196,33 @@
@code{magic-fallback-mode-alist} contains forms that check for image
files, HTML/XML/SGML files, and Postscript files.
- When you visit a file that does not specify a major mode to use, or
-when you create a new buffer with @kbd{C-x b}, the default value of
-the variable @code{major-mode} specifies which major mode to use. Normally
-its value is the symbol @code{fundamental-mode}, which specifies
-Fundamental mode. If the default value of @code{major-mode} is @code{nil},
-the major mode is taken from the previously current buffer.
address@hidden major-mode
+ Once a major mode is chosen, Emacs sets the value of the variable
address@hidden to the symbol for that major mode (e.g.,
address@hidden for Text mode). This is a per-buffer variable
+(@pxref{Locals}); its buffer-local value is set automatically, and you
+should not change it yourself.
+
+ The default value of @code{major-mode} determines the major mode to
+use for files that do not specify a major mode, and for new buffers
+created with @kbd{C-x b}. Normally, this default value is the symbol
address@hidden, which specifies Fundamental mode. You can
+change it via the Customization interface (@pxref{Easy
+Customization}), or by adding a line like this to your init file
+(@pxref{Init File}):
+
address@hidden
+(setq-default major-mode 'text-mode)
address@hidden smallexample
+
address@hidden
+If the default value of @code{major-mode} is @code{nil}, the major
+mode is taken from the previously current buffer.
@findex normal-mode
- If you change the major mode of a buffer, you can go back to the major
-mode Emacs would choose automatically: use the command @kbd{M-x
-normal-mode} to do this. This is the same function that
+ If you have changed the major mode of a buffer, you can return to
+the major mode Emacs would have chosen automatically, by typing
address@hidden normal-mode}. This is the same function that
@code{find-file} calls to choose the major mode. It also processes
the file's @samp{-*-} line or local variables list (if any).
@xref{File Variables}.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99623: Improve documentation for setting buffer-local vars (Bug#5688).,
Chong Yidong <=