diff options
| author | Stefan Kangas | 2022-10-03 03:53:22 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-10-03 04:02:39 +0200 |
| commit | 2973f91fb3de824cd21399dc5cd298d4b8be4022 (patch) | |
| tree | e74aee8541a0814ba7045f9c80ffc874856ecf3d /lisp/autoinsert.el | |
| parent | 395119998574051e53d466d55136d3e6498e90ef (diff) | |
| download | emacs-2973f91fb3de824cd21399dc5cd298d4b8be4022.tar.gz emacs-2973f91fb3de824cd21399dc5cd298d4b8be4022.zip | |
Improve auto-insert-mode documentation
* lisp/autoinsert.el: Improve usage instructions and formatting.
(auto-insert-directory): Doc fix; the directory does not have to end
in slash.
Diffstat (limited to 'lisp/autoinsert.el')
| -rw-r--r-- | lisp/autoinsert.el | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 29d10bc6295..580f6b3ced2 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; autoinsert.el --- automatic mode-dependent insertion of text into new files -*- lexical-binding: t -*- | 1 | ;;; autoinsert.el --- automatic mode-dependent insertion of text into new files -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1994-1995, 1998, 2000-2022 Free Software | 3 | ;; Copyright (C) 1985-2022 Free Software Foundation, Inc. |
| 4 | ;; Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Charlie Martin <crm@cs.duke.edu> | 5 | ;; Author: Charlie Martin <crm@cs.duke.edu> |
| 7 | ;; Adapted-By: Daniel Pfeiffer <occitan@esperanto.org> | 6 | ;; Adapted-By: Daniel Pfeiffer <occitan@esperanto.org> |
| @@ -25,27 +24,27 @@ | |||
| 25 | 24 | ||
| 26 | ;;; Commentary: | 25 | ;;; Commentary: |
| 27 | 26 | ||
| 28 | ;; The following defines an association list for text to be | 27 | ;; The following defines an association list for text to be |
| 29 | ;; automatically inserted when a new file is created, and a function | 28 | ;; automatically inserted when a new file is created, and a function |
| 30 | ;; which automatically inserts these files; the idea is to insert | 29 | ;; which automatically inserts these files; the idea is to insert |
| 31 | ;; default text much as the mode is automatically set using | 30 | ;; default text much as the mode is automatically set using |
| 32 | ;; auto-mode-alist. | 31 | ;; auto-mode-alist. |
| 32 | ;; | ||
| 33 | ;; To use, add this to your Init file: | ||
| 33 | ;; | 34 | ;; |
| 34 | ;; To use: | ||
| 35 | ;; (auto-insert-mode t) | 35 | ;; (auto-insert-mode t) |
| 36 | ;; setq auto-insert-directory to an appropriate slash-terminated value | 36 | ;; (setq auto-insert-directory "~/some-dir") |
| 37 | ;; | 37 | ;; |
| 38 | ;; You can also customize the variable `auto-insert-mode' to load the | 38 | ;; You can also customize the variable `auto-insert-mode' to load the |
| 39 | ;; package. Alternatively, add the following to your init file: | 39 | ;; package. |
| 40 | ;; (auto-insert-mode 1) | ||
| 41 | ;; | 40 | ;; |
| 42 | ;; Author: Charlie Martin | 41 | ;; Author: Charlie Martin |
| 43 | ;; Department of Computer Science and | 42 | ;; Department of Computer Science and |
| 44 | ;; National Biomedical Simulation Resource | 43 | ;; National Biomedical Simulation Resource |
| 45 | ;; Box 3709 | 44 | ;; Box 3709 |
| 46 | ;; Duke University Medical Center | 45 | ;; Duke University Medical Center |
| 47 | ;; Durham, NC 27710 | 46 | ;; Durham, NC 27710 |
| 48 | ;; (crm@cs.duke.edu,mcnc!duke!crm) | 47 | ;; (crm@cs.duke.edu,mcnc!duke!crm) |
| 49 | 48 | ||
| 50 | ;;; Code: | 49 | ;;; Code: |
| 51 | 50 | ||
| @@ -348,9 +347,7 @@ described above, e.g. [\"header.insert\" date-and-author-update]." | |||
| 348 | 347 | ||
| 349 | ;; Establish a default value for auto-insert-directory | 348 | ;; Establish a default value for auto-insert-directory |
| 350 | (defcustom auto-insert-directory "~/insert/" | 349 | (defcustom auto-insert-directory "~/insert/" |
| 351 | "Directory from which auto-inserted files are taken. | 350 | "Directory from which auto-inserted files are taken." |
| 352 | The value must be an absolute directory name; | ||
| 353 | thus, on a GNU or Unix system, it must end in a slash." | ||
| 354 | :type 'directory) | 351 | :type 'directory) |
| 355 | 352 | ||
| 356 | 353 | ||