aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2011-02-22 09:22:09 +0900
committerKenichi Handa <[email protected]>2011-02-22 09:22:09 +0900
commit2e15a2cf4ddfbda0bbf972036c11d464f7ba6226 (patch)
tree98bb8620d5f3b2cf8637bf1ae747330fcd02f7fa /doc/lispref
parent1f459fa46cbd419bc55f8be03bce617d96af4da5 (diff)
parent47301027bbbbd1babcfedf1ef38b2c776b33c462 (diff)
merge emacs-23
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog14
-rw-r--r--doc/lispref/elisp.texi2
-rw-r--r--doc/lispref/files.texi30
-rw-r--r--doc/lispref/keymaps.texi6
-rw-r--r--doc/lispref/variables.texi2
5 files changed, 53 insertions, 1 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 56f35ef329..9be1104a25 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,17 @@
+2011-02-18 Eli Zaretskii <[email protected]>
+
+ * elisp.texi: Sync @dircategory with ../../info/dir.
+
+ * files.texi (Visiting Functions): Document find-file-literally,
+ both the command and the variable.
+
+ * variables.texi (Creating Buffer-Local): Explain the meaning of
+ permanent local variables.
+
+2011-02-18 Glenn Morris <[email protected]>
+
+ * keymaps.texi (Remapping Commands): Mention how to undo it.
+
2011-02-05 Chong Yidong <[email protected]>
* commands.texi (Accessing Mouse): Note that a header line is not
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index aef8229e4b..cfc02a0706 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -63,7 +63,7 @@ developing GNU and promoting software freedom.''
@end quotation
@end copying
-@dircategory Emacs
+@dircategory GNU Emacs Lisp
@direntry
* Elisp: (elisp). The Emacs Lisp Reference Manual.
@end direntry
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 1f66da9834..fd9f3bb464 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -114,6 +114,26 @@ When @code{find-file} is called interactively, it prompts for
@var{filename} in the minibuffer.
@end deffn
+@deffn Command find-file-literally filename
+This command visits @var{filename}, like @code{find-file} does, but it
+does not perform any format conversions (@pxref{Format Conversion}),
+character code conversions (@pxref{Coding Systems}), or end-of-line
+conversions (@pxref{Coding System Basics, End of line conversion}).
+The buffer visiting the file is made unibyte, and its major mode is
+Fundamental mode, regardless of the file name. File local variable
+specifications in the file (@pxref{File Local Variables}) are
+ignored, and automatic decompression and adding a newline at the end
+of the file due to @code{require-final-newline} (@pxref{Saving
+Buffers, require-final-newline}) are also disabled.
+
+Note that if Emacs already has a buffer visiting the same file
+non-literally, it will not visit the same file literally, but instead
+just switch to the existing buffer. If you want to be sure of
+accessing a file's contents literally, you should create a temporary
+buffer and then read the file contents into it using
+@code{insert-file-contents-literally} (@pxref{Reading from Files}).
+@end deffn
+
@defun find-file-noselect filename &optional nowarn rawfile wildcards
This function is the guts of all the file-visiting functions. It
returns a buffer visiting the file @var{filename}. You may make the
@@ -225,6 +245,16 @@ This is not a normal hook because the values of the functions are
used, and in many cases only some of the functions are called.
@end defvar
+@defvar find-file-literally
+This buffer-local variable, if set to a non-@code{nil} value, makes
+@code{save-buffer} behave as if the buffer were visiting its file
+literally, i.e. without conversions of any kind. The command
+@code{find-file-literally} sets this variable's local value, but other
+equivalent functions and commands can do that as well, e.g.@: to avoid
+automatic addition of a newline at the end of the file. This variable
+us permanent local, so it is unaffected by changes of major modes.
+@end defvar
+
@node Subroutines of Visiting
@comment node-name, next, previous, up
@subsection Subroutines of Visiting
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 1763f3936c..bc1937442f 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1510,6 +1510,12 @@ does not have the effect of remapping @code{kill-line} into
if an ordinary binding specifies @code{my-kill-line}, this keymap will
remap it to @code{my-other-kill-line}.
+To undo the remapping of a command, remap it to @code{nil}; e.g.
+
+@smallexample
+(define-key my-mode-map [remap kill-line] nil)
+@end smallexample
+
@defun command-remapping command &optional position keymaps
This function returns the remapping for @var{command} (a symbol),
given the current active keymaps. If @var{command} is not remapped
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 2baf389582..18343b4dc8 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1409,6 +1409,8 @@ subsequent major mode. @xref{Hooks}.
@cindex permanent local variable
A buffer-local variable is @dfn{permanent} if the variable name (a
symbol) has a @code{permanent-local} property that is non-@code{nil}.
+Such variables are unaffected by @code{kill-all-local-variables}, and
+their local bindings are therefore not cleared by changing major modes.
Permanent locals are appropriate for data pertaining to where the file
came from or how to save it, rather than with how to edit the contents.