Configure emacs's auto-insert module
Configure emacs's auto-insert module
Table of Contents
- 1 how to use auto-insert?
- 2 Configure auto-insert-alist
1 how to use auto-insert?
auto-insert mode is very useful, which can be used to declare the license in
the header of the source code and some personal information, for example, who
create this file and when?
auto-insert will insert declaration according the variable named auto-insert-alist. It first search this variable and find the item match the file type, then extract the action to finish the auto insert.
If you build an new elisp file buffer, and execute auto-insert command, it will insert the fantastic declaration with GPL license. But this command performs sucks in other mode like c-mode or python-mode. So you must configure variable auto-insert-alist by your self.
auto-insert will insert declaration according the variable named auto-insert-alist. It first search this variable and find the item match the file type, then extract the action to finish the auto insert.
If you build an new elisp file buffer, and execute auto-insert command, it will insert the fantastic declaration with GPL license. But this command performs sucks in other mode like c-mode or python-mode. So you must configure variable auto-insert-alist by your self.
2 Configure auto-insert-alist
I upload the source code into github, download according following address:
https://github.com/suzp1984/donkey/tree/master/elisp/auto-insert
You should configure variable auto-insert-directory according to your environment.
You should configure variable auto-insert-directory according to your environment.
3 TODO
- Maybe I should add more license declaration, and Let the user chose which license he want.
- Add configure for another languages.
Comments
Post a Comment