I want to use autoinsert with C and headers, the code from http://www.emacswiki.org/emacs/AutoInsertMode works well so I made my own template for header in an elisp funtion, but the insertion repeat to time, asking me twice, it results in :
/**
* test.h -- test
*
* Written on Saturday, 28 November 2015.
*/
#ifndef TEST_H
#define TEST_H
int main()
{
/**
* test.h --
*
* Written on Saturday, 28 November 2015.
*/
#ifndef TEST_H
#define TEST_H
int main()
{
}
#endif
}
#endif