mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Various doc fixes for auto-insert-mode
* doc/misc/autotype.texi (Autoinserting): Various doc fixes. * lisp/autoinsert.el (top-level): Recommend 'auto-insert-mode' over 'add-hook'.
This commit is contained in:
parent
38021e5559
commit
1f1b2e3da6
2 changed files with 10 additions and 9 deletions
|
|
@ -268,8 +268,8 @@ certain contexts. For example an escaped character stands for itself.
|
|||
@kbd{M-x auto-insert} will put some predefined text at the beginning of
|
||||
the buffer. The main application for this function, as its name suggests,
|
||||
is to have it be called automatically every time an empty, and only an
|
||||
empty file is visited. This is accomplished by putting @code{(add-hook
|
||||
'find-file-hook 'auto-insert)} into your @file{~/.emacs} file
|
||||
empty file is visited. This is accomplished by putting
|
||||
@code{(auto-insert-mode t)} into your init file
|
||||
(@pxref{Init File,,, emacs, The GNU Emacs Manual}).
|
||||
|
||||
@vindex auto-insert-alist
|
||||
|
|
@ -300,15 +300,16 @@ the filename to prevent multiple inclusions. C and C++ sources insert an
|
|||
include of the header. Makefiles insert the file makefile.inc if it exists.
|
||||
|
||||
TeX and bibTeX mode files insert the file tex-insert.tex if it exists, while
|
||||
LaTeX mode files insert a typical @code{\documentclass} frame. Html
|
||||
LaTeX mode files insert a typical @code{\documentclass} frame. HTML
|
||||
files insert a skeleton with the usual frame.
|
||||
|
||||
Ada mode files call the Ada header skeleton command. Emacs lisp
|
||||
Ada mode files call the Ada header skeleton command. Emacs Lisp
|
||||
source files insert the usual header, with a copyright of your
|
||||
environment variable @env{$ORGANIZATION} or else the FSF, and prompt
|
||||
for valid keywords describing the contents. Files in a @file{bin}
|
||||
directory for which Emacs could determine no specialized mode
|
||||
(@pxref{Choosing Modes,,, emacs, The GNU Emacs Manual}) are set to Shell script mode.
|
||||
environment variable @env{$ORGANIZATION} or else the name of the
|
||||
current user, and prompt for valid keywords describing the contents.
|
||||
Files in a @file{bin} directory for which Emacs could determine no
|
||||
specialized mode (@pxref{Choosing Modes,,, emacs, The GNU Emacs
|
||||
Manual}) are set to Shell script mode.
|
||||
|
||||
@findex define-auto-insert
|
||||
In Lisp (@pxref{Init File,,, emacs, The GNU Emacs Manual}) you can use the function
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
;; auto-mode-alist.
|
||||
;;
|
||||
;; To use:
|
||||
;; (add-hook 'find-file-hook 'auto-insert)
|
||||
;; (auto-insert-mode t)
|
||||
;; setq auto-insert-directory to an appropriate slash-terminated value
|
||||
;;
|
||||
;; You can also customize the variable `auto-insert-mode' to load the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue