auto-header.el
But that was many years, and more important - to me - many computers ago. So the "original" auto-header.el I had somewhere on the way got corrupted, vanished or whatever else happens to your files. I also had a (longish) dry period where I was so consumed with work related stuff (and more important, my primary laptop was consumed with work related stuff), so I didn't use emacs in a long long time. Actually I used xemacs before, but with all kinds of good stuff having been added to GNU emacs lately I really don't see the point anymore - heresy, I know.
But back to auto-header.el - since it's open source I thought I do a Linus, you know, like once he said he doesn't take backups, he just uploads his code to some ftp site and lets its users mirror it all over the world. So I just searched for it and downloaded it. It didn't work. Hmm, maybe an outdated version, I thought, and downloaded another one. That one didn't work either, and the error message was the same:
(invalid-read-syntax ". in wrong context")
Hmm. Searching for the answer I find that there are two reasons for that error message:
- the file was saved using the wrong character set (well, that's not very likely, given that it's a plain ASCII file)
- a missing '"' somewhere in the file
Not too afraid of LISP I boldly opened the file in emacs, got Emacs-Lisp mode and font-lock. Automatically. That's the joy of emacs :)
But I digress. I found somehwere in the list defining the default boilerplate setup this gem:
("cvslog" . (nil "$Log: auto-header.el,v $ ("cvslog" . (nil "Revision 1.5 2002/11/26 12:53:18 dave ("cvslog" . (nil "readded
What a mess! The lines are not only missing the closing '"', they're missing all closing parentheses as well. At least font-lock-mode was quite some help finding these lines, my syntax highlighter at the time doesn't do LISP at all.
Get the fixed file from my git repository. When I get bored or adventurous I may add some support for subversion/git revision numbers or hashes or whatever, but don't hold your breath. | Some time ago... well, ok, ten-eleven years ago I was marginally involved in a smallish emacs extension called auto-header. What it does is basically adding a boilerplate to your files after you press some mystical key combinations. I was largely responsible for it to support the (then new) emacs customization framework.