X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/0d9f702fd085bc8ad560a3e1f08d5e93054a5d33..5010583555fce883d83e7a50e26d9d34f9e108ce:/lisp/autoinsert.el diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index a5634dde5a..c45d64e1cd 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -1,7 +1,7 @@ ;;; autoinsert.el --- automatic mode-dependent insertion of text into new files -;; Copyright (C) 1985, 1986, 1987, 1994, 1995, 1998, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1994-1995, 1998, 2000-2013 Free Software +;; Foundation, Inc. ;; Author: Charlie Martin ;; Adapted-By: Daniel Pfeiffer @@ -36,7 +36,7 @@ ;; setq auto-insert-directory to an appropriate slash-terminated value ;; ;; You can also customize the variable `auto-insert-mode' to load the -;; package. Alternatively, add the following to your .emacs file: +;; package. Alternatively, add the following to your init file: ;; (auto-insert-mode 1) ;; ;; Author: Charlie Martin @@ -135,19 +135,19 @@ If this contains a %s, that will be replaced by the matching rule." (("\\.[1-9]\\'" . "Man page skeleton") "Short description: " - ".\\\" Copyright (C), " (substring (current-time-string) -4) " " + ".\\\" Copyright (C), " (format-time-string "%Y") " " (getenv "ORGANIZATION") | (progn user-full-name) " .\\\" You may distribute this file under the terms of the GNU Free .\\\" Documentation License. -.TH " (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) +.TH " (file-name-base) " " (file-name-extension (buffer-file-name)) " " (format-time-string "%Y-%m-%d ") "\n.SH NAME\n" - (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) + (file-name-base) " \\- " str "\n.SH SYNOPSIS -.B " (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) +.B " (file-name-base) "\n" _ " @@ -166,7 +166,7 @@ If this contains a %s, that will be replaced by the matching rule." "Short description: " ";;; " (file-name-nondirectory (buffer-file-name)) " --- " str " -;; Copyright (C) " (substring (current-time-string) -4) " " +;; Copyright (C) " (format-time-string "%Y") " " (getenv "ORGANIZATION") | (progn user-full-name) " ;; Author: " (user-full-name) @@ -207,7 +207,7 @@ If this contains a %s, that will be replaced by the matching rule." \(provide '" - (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) + (file-name-base) ") \;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n") (("\\.texi\\(nfo\\)?\\'" . "Texinfo file skeleton") @@ -215,14 +215,13 @@ If this contains a %s, that will be replaced by the matching rule." "\\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename " - (file-name-sans-extension - (file-name-nondirectory (buffer-file-name))) ".info\n" + (file-name-base) ".info\n" "@settitle " str " @c %**end of header @copying\n" (setq short-description (read-string "Short description: ")) ".\n\n" - "Copyright @copyright{} " (substring (current-time-string) -4) " " + "Copyright @copyright{} " (format-time-string "%Y") " " (getenv "ORGANIZATION") | (progn user-full-name) " @quotation @@ -397,9 +396,10 @@ or if CONDITION had no actions, after all other CONDITIONs." ;;;###autoload (define-minor-mode auto-insert-mode - "Toggle Auto-insert mode. -With prefix ARG, turn Auto-insert mode on if and only if ARG is positive. -Returns the new status of Auto-insert mode (non-nil means on). + "Toggle Auto-insert mode, a global minor mode. +With a prefix argument ARG, enable Auto-insert mode if ARG is +positive, and disable it otherwise. If called from Lisp, enable +the mode if ARG is omitted or nil. When Auto-insert mode is enabled, when new files are created you can insert a template for the file depending on the mode of the buffer."