diff lisp/packages/autoinsert.el @ 189:489f57a838ef r20-3b21

Import from CVS: tag r20-3b21
author cvs
date Mon, 13 Aug 2007 09:57:07 +0200
parents b9518feda344
children 78478c60bfcd
line wrap: on
line diff
--- a/lisp/packages/autoinsert.el	Mon Aug 13 09:56:30 2007 +0200
+++ b/lisp/packages/autoinsert.el	Mon Aug 13 09:57:07 2007 +0200
@@ -45,7 +45,12 @@
 
 ;;; Code:
 
-(defvar auto-insert 'not-modified
+(defgroup auto-insert nil
+  "Automatic mode-dependent insertion of text into new files."
+  :group 'tools)
+
+
+(defcustom auto-insert 'not-modified
   "*Controls automatic insertion into newly found empty files:
 	nil	do nothing
 	t	insert if possible
@@ -55,17 +60,30 @@
 save it with  \\[write-file] RET.
 This variable is used when `auto-insert' is called as a function, e.g.
 when you do (add-hook 'find-file-hooks 'auto-insert).
-With \\[auto-insert], this is always treated as if it were `t'.")
+With \\[auto-insert], this is always treated as if it were `t'."
+  :type '(radio (const :tag "Do nothing" nil)
+		(const :tag "Insert if possible" t)
+		(sexp :format "%t\n"
+		      :tag "Insert if possible, but mark as unmodified"
+		      other))
+  :require 'autoinsert
+  :group 'auto-insert)
 
 
-(defvar auto-insert-query 'function
+(defcustom auto-insert-query 'function
   "*If non-`nil', ask user before auto-inserting.
-When this is `function', only ask when called non-interactively.")
+When this is `function', only ask when called non-interactively."
+  :type '(choice (const :tag "Don't ask" nil)
+		 (const :tag "Ask when non-interactive" function)
+		 (sexp :format "%t\n" :tag "Ask" other))
+  :group 'auto-insert)
 
 
-(defvar auto-insert-prompt "Perform %s auto-insertion? "
+(defcustom auto-insert-prompt "Perform %s auto-insertion? "
   "*Prompt to use when querying whether to auto-insert.
-If this contains a %s, that will be replaced by the matching rule.")
+If this contains a %s, that will be replaced by the matching rule."
+  :type 'string
+  :group 'auto-insert)
 
 
 (defvar auto-insert-alist