[svlug] To the VI masters
Aaron Lehmann
aaronl at vitelus.com
Mon Oct 16 18:10:02 PDT 2000
On Mon, Oct 16, 2000 at 05:20:41PM -0700, Greg Herlein wrote:
> > As for me, I'm still used to Emacs Lisp programming and I reccomend
> > it: it sure beats these macros.
>
> Do you have a macro that does the // to /* */ conversion for
> emacs? If so, I'd love to have it! I'll share my wimpy but
> useful for me .emacs file for it. :)
For you, here's an Emacs defun to do the same thing:
(defun cpp-to-c
"Replace the next C++ comment with a C comment"
(interactive)
(re-search-forward "//")
(replace-match "/*")
(end-of-line)
(insert " */"))
Have fun :). It would be easy to modify it to change every C++ comment
in the buffer to a C comment, and I'll do that if you want. You can
stick this into your .emacs file and bind a key to it.
As for .emacs files, mine is at http://vitelus.com/aaronl/pub/conf/emacs.
It's a whimpy 23k. :(
More information about the svlug
mailing list