emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1f1b2e3: Various doc fixes for auto-insert-mode


From: Stefan Kangas
Subject: [Emacs-diffs] master 1f1b2e3: Various doc fixes for auto-insert-mode
Date: Tue, 22 Oct 2019 12:06:47 -0400 (EDT)

branch: master
commit 1f1b2e3da66ecc47bcaae4ea7df0a8ef884b40d0
Author: Stefan Kangas <address@hidden>
Commit: Stefan Kangas <address@hidden>

    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'.
---
 doc/misc/autotype.texi | 17 +++++++++--------
 lisp/autoinsert.el     |  2 +-
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi
index 89cba18..e36793b 100644
--- a/doc/misc/autotype.texi
+++ b/doc/misc/autotype.texi
@@ -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
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index a77ca09..b8c2bfd 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]