X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a749f1c648f2b9bf1a0b0b10e2da4c1c4e3d431d..2f67f8a145af8f185f644b1d094a03895a124ef1:/lisp/autoinsert.el diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 985ae24245..43fa31288e 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -1,6 +1,6 @@ ;;; autoinsert.el --- automatic mode-dependent insertion of text into new files -;; Copyright (C) 1985-1987, 1994-1995, 1998, 2000-2015 Free Software +;; Copyright (C) 1985-1987, 1994-1995, 1998, 2000-2016 Free Software ;; Foundation, Inc. ;; Author: Charlie Martin @@ -67,7 +67,7 @@ Insertion is possible when something appropriate is found in `auto-insert-alist'. When the insertion is marked as unmodified, you can save it with \\[write-file] RET. This variable is used when the function `auto-insert' is called, e.g. -when you do (add-hook 'find-file-hook 'auto-insert). +when you do (add-hook \\='find-file-hook \\='auto-insert). With \\[auto-insert], this is always treated as if it were t." :type '(choice (const :tag "Insert if possible" t) (const :tag "Do nothing" nil) @@ -305,7 +305,17 @@ ACTION may be a skeleton to insert (see `skeleton-insert'), an absolute file-name or one relative to `auto-insert-directory' or a function to call. ACTION may also be a vector containing several successive single actions as described above, e.g. [\"header.insert\" date-and-author-update]." - :type 'sexp + :type '(alist :key-type + (choice (regexp :tag "Regexp matching file name") + (symbol :tag "Major mode") + (cons :tag "Condition and description" + (choice :tag "Condition" + (regexp :tag "Regexp matching file name") + (symbol :tag "Major mode")) + (string :tag "Description"))) + ;; There's no custom equivalent of "repeat" for vectors. + :value-type (choice file function + (sexp :tag "Skeleton or vector"))) :version "25.1" :group 'auto-insert)