1 |
;;; autoinsert.el --- automatic mode-dependent insertion of text into new files |
;;; autoinsert.el --- automatic mode-dependent insertion of text into new files |
2 |
|
|
3 |
;; Copyright (C) 1985, 86, 87, 94, 95, 98, 2000, 03 Free Software Foundation, Inc. |
;; Copyright (C) 1985, 1986, 1987, 1994, 1995, 1998, 2000, 2003, 2005 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Charlie Martin <crm@cs.duke.edu> |
;; Author: Charlie Martin <crm@cs.duke.edu> |
7 |
;; Adapted-By: Daniel Pfeiffer <occitan@esperanto.org> |
;; Adapted-By: Daniel Pfeiffer <occitan@esperanto.org> |
34 |
;; auto-mode-alist. |
;; auto-mode-alist. |
35 |
;; |
;; |
36 |
;; To use: |
;; To use: |
37 |
;; (add-hook 'find-file-hooks 'auto-insert) |
;; (add-hook 'find-file-hook 'auto-insert) |
38 |
;; setq auto-insert-directory to an appropriate slash-terminated value |
;; setq auto-insert-directory to an appropriate slash-terminated value |
39 |
;; |
;; |
40 |
;; You can also customize the variable `auto-insert-mode' to load the |
;; You can also customize the variable `auto-insert-mode' to load the |
68 |
`auto-insert-alist'. When the insertion is marked as unmodified, you can |
`auto-insert-alist'. When the insertion is marked as unmodified, you can |
69 |
save it with \\[write-file] RET. |
save it with \\[write-file] RET. |
70 |
This variable is used when the function `auto-insert' is called, e.g. |
This variable is used when the function `auto-insert' is called, e.g. |
71 |
when you do (add-hook 'find-file-hooks 'auto-insert). |
when you do (add-hook 'find-file-hook 'auto-insert). |
72 |
With \\[auto-insert], this is always treated as if it were t." |
With \\[auto-insert], this is always treated as if it were t." |
73 |
:type '(choice (const :tag "Insert if possible" t) |
:type '(choice (const :tag "Insert if possible" t) |
74 |
(const :tag "Do nothing" nil) |
(const :tag "Do nothing" nil) |
327 |
insert a template for the file depending on the mode of the buffer." |
insert a template for the file depending on the mode of the buffer." |
328 |
:global t :group 'auto-insert |
:global t :group 'auto-insert |
329 |
(if auto-insert-mode |
(if auto-insert-mode |
330 |
(add-hook 'find-file-hooks 'auto-insert) |
(add-hook 'find-file-hook 'auto-insert) |
331 |
(remove-hook 'find-file-hooks 'auto-insert))) |
(remove-hook 'find-file-hook 'auto-insert))) |
332 |
|
|
333 |
(provide 'autoinsert) |
(provide 'autoinsert) |
334 |
|
|
335 |
;;; arch-tag: 5b6630ac-c735-43cf-b097-b78c622af909 |
;; arch-tag: 5b6630ac-c735-43cf-b097-b78c622af909 |
336 |
;;; autoinsert.el ends here |
;;; autoinsert.el ends here |