5

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?

dgtized
  • 4,169
  • 20
  • 41

2 Answers2

6

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.

dgtized
  • 4,169
  • 20
  • 41
0

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.

Drew
  • 75,699
  • 9
  • 109
  • 225