* README_MINOR - Introduction to minor modes.

$Id: README_MINOR,v 5.6 1993/07/07 00:40:56 amanda Exp $

** min-bind.el:  Keymap, variable, and syntax bindings in minor modes

Minor modes that bind a key, set a variable, or change a syntax entry
are inheritly unsafe.  While the minor mode may store the old binding
and restore it when you leave the mode, this will only work if it is
the only minor mode that bind that particular key, variable, or syntax
entry.

Authors of minor modes are therefore encouraged to use the
features of min-bind.el, which will handle conflicts and ensure that
the proper value is restored when you exit from a minor mode.  Besides
being much more safe, the functions defined in min-bind.el are also
more convenient to use.  So you have no excuse for not using them when
you write a minor mode.

All the minor modes mentioned in this file are build upon
min-bind.el.

** min-out.el:  Outline Minor Mode

Allows you to use the outline-mode commands while in another major
mode.  This is already integrated in LaTeX-mode.  You toggle the mode
with M-x outline-minor-mode.  If you want to support other major
modes, let them change the outline-regexp and outline-level-function.
outline-regexp matches header lines (by default lines starting with
one or more *'s), and outline-level-function calculate the level of
the header (by default the length of the string matched by
outline-regexp).

To use, add to your init file:

(autoload 'outline-minor-mode "min-out" "Toggle outline minor mode." t)
(make-variable-buffer-local 'outline-prefix-char)
(setq-default outline-prefix-char "\C-c\C-o") ; Change to get a better prefix
(make-variable-buffer-local 'outline-regexp)
(setq-default outline-regexp "[*\^l]+")
(make-variable-buffer-local 'outline-level-function)
(setq-default outline-level-function 'outline-level-default)

** min-key.el:  Mapping the keyboard layout

This package allows you to specify a language specific keyboard
mapping between various encodings of an alphabet, and it also allows
you to convert the text in the buffer directly between the supported
encodings.

Currently the following languages / character set encodings are
supported: 

"Danish":
	"ISO 646 DK" "Keyboard Layout" "Digraphs" "TeX" "ISO 8859 Latin 1"

"Swedish":
	"ISO 646 SE" "Keyboard Layout" "Digraphs" "TeX" "ISO 8859 Latin 1"

"German":
	"Keyboard Layout" "Digraphs" "TeX" "ISO 8859 Latin 1"

"Russian":
	"Keyboard Layout" "TeX" "KOI8"

"Keyboard Layout":
	"QWERTY" "Dvorak"

"ISO 8859 Latin 1":
	"ISO 8859 Latin 1" "Monograph" "Digraph" 
	"ISO 646" "RFC 1345" "Backspace" "TeX"

The keyboard remapping is implemented as a minor mode.  You initially
select the mapping with ``M-x keyboard-query-mapping'', and can then
toggle mode with ``M-x keyboard-mode''.  Once in the minor mode, you
can (optionally) get the original binding of a key by typing the the
key twice.

You convert between character sets by typing 
``M-x convert-character-query'', and answering the questions.  Use
`convert-character-encoding' to convert non-interactively. 

To use, add to your init file:

(autoload 'keyboard-mode "min-key" "Toggle keyboard-mode." t)
(autoload 'keyboard-query-mapping "min-key" "Query keyboard-mode." t)
(autoload 'convert-character-query "min-key" "Convert between encodings." t)
(autoload 'convert-character-encoding "min-key"
          "Convert between encodings." nil)

You most likely want to define a short-cut for often used mappings.
The following function redefine the keys on an international
keyboard to generate Danish characters as TeX macros.

(defun tex-dk-double-mode (arg)
  "DK TeX keys on international keyboard."
  (interactive "P")
  (require 'min-key)
  (if (or (and (null arg) keyboard-mode)
	  (<= (prefix-numeric-value arg) 0))
      (keyboard-mode -1)
    (keyboard-set-mapping "Danish" "Keyboard Layout" "TeX" t)
    (keyboard-mode 1)))

** min-ind.el:  Automatic indentation

Auto-indent mode works by invoking indent-relative for TAB, and using
indent-relative-maybe as the indent-line-function for auto-fill, and
NEWLINE. Enter and leave with M-x auto-indent-mode.

To use, add to your init file:

(autoload 'auto-indent-mode "min-ind" "Toggle auto-indent-mode." t)

** min-ispl.el: Automatic ispell of words

In auto-ispell-mode `space' or `return' automatically trigger
`ispell-word' on previously typed word.  M-TAB will make an ispell
completion. Enter and leave with M-x auto-ispell-mode.

To use, add to your init file:

(autoload 'auto-ispell-mode "min-ispl" "Toggle auto-ispell-mode." t)

** ltx-dead.el: Accent's in LaTeX

Get TeX accent on letters by typing accent key followed by letter.
Enter and leave with M-x LaTeX-dead-mode.

To use, add to your init file:

(setq LaTeX-dead-keys '(?' ?` ?\" ?^ ?~)) ; Remove those you don't need
(autoload 'LaTeX-dead-mode "ltx-dead" "Toggle LaTeX-dead-mode." t)

** tex-math.el: Mathematical macros in TeX

Bind mathematical to backquote.  You enter mathematical macros with
` letter, e.g. ` a will insert \alpha in the buffer.

To use, add to your init file:

(setq LaTeX-math-abbrev-prefix "`") ; Change if you like ` as is.
(autoload 'LaTeX-math-mode "tex-math" "Toggle math mode." t)

** For your init file.

;;; Outline Minor Mode
(autoload 'outline-minor-mode "min-out" "Toggle outline minor mode." t)
(make-variable-buffer-local 'outline-prefix-char)
(setq-default outline-prefix-char "\C-c\C-o") ; Change to get a better prefix
(make-variable-buffer-local 'outline-regexp)
(setq-default outline-regexp "[*\^l]+")
(make-variable-buffer-local 'outline-level-function)
(setq-default outline-level-function 'outline-level-default)

;;; Mapping the keyboard layout
(autoload 'keyboard-mode "min-key" "Toggle keyboard-mode." t)
(autoload 'keyboard-query-mapping "min-key" "Query keyboard-mode." t)
(autoload 'convert-character-query "min-key" "Convert between encodings." t)

;;; Accent's in LaTeX
(setq LaTeX-dead-keys '(?' ?` ?\" ?^ ?~)) ; Remove those you don't need
(autoload 'LaTeX-dead-mode "ltx-dead" "Toggle LaTeX-dead-mode." t)

;;; Mathematical macros in TeX
(setq LaTeX-math-abbrev-prefix "`") ; Change if you like ` as is.
(autoload 'LaTeX-math-mode "tex-math" "Toggle math mode." t)

;;; Other minor modes
(autoload 'auto-indent-mode "min-ind" "Toggle auto-indent-mode." t)
(autoload 'auto-ispell-mode "min-ispl" "Toggle auto-ispell-mode." t)

** Emacs

Local Variables:
mode: text
mode: outline-minor
End:


