At some point I remember encountering a command that generated a skeleton of a properly formatted emacs-lisp library as below:

;;; library.el --- summary

;; Copyright ...

;; Author:
;; Keywords:

;; License

;;; Commentary:

;;; Code:

(provide 'library)

;;; library.el ends here

After some searching I found checkdoc, which prompts for summary, and commentary and code. Is that the only template generation for a new emacs lisp library builtin to emacs core? Are there any tempo or skeleton based templates for a new emacs lisp library builtin to Emacs core, or somewhere else with yasnippet?

2 Answers 2


Just remembered it was auto-insert-mode. Make a new elisp file, run M-x auto-insert, and it prompts for summary, author, inserts the license and everything.


I guess you found your answer. But you might also want to look at library header2.el.

It doesn't prompt you for anything. But it can automatically provide a customized file header for a new file. And it can automatically update the header (e.g. when you save the file). Unlike the example you show, by default it does not insert any code - just comments. But that too you can customize.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.