> Here is what I hard coded in add-log.el: > > ((eq major-mode 'autoconf-mode) > (if (re-search-backward > "^\\(m4_define\\|m4_defun\\|A._DEFUN\\) > (\\[*\\([A-Za-z0-9_]+\\)" nil t) > (buffer-substring (match-beginning 2) > (match-end 2)))) > ((eq major-mode 'autotest-mode) > (if (re-search-backward > "^\\(m4_define\\|m4_defun\\|AT_SETUP\\) > (\\[+\\([^]]+\\)" nil t) > (buffer-substring (match-beginning 2) > (match-end 2))))
This is likely possible to automate, but I'm not familiar enough with add-log.el to help further. > I would like X?Emacs to understand that, and also to trigger the right > mode (e.g., *.at is Autotest, configure.in and *.ac is Autoconf) > automatically, without the user having to edit her files. This seems highly unlikely if the two modes stay independent from the emacsen. At the very least, you'll have to have some ";;;autoload" lines in the .el files; then the user can update the autoloads (perhaps this can be done from automake during the install; not sure if autoloads are enough to associate extensions though). Basically, to support this without the user having to edit her .emacs, you need it to be set up from the emacs distribution (so you'd require a future emacs), or by the sysadmin (through site-load.el or however it's called).
