help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two questions....


From: Kevin Dziulko
Subject: Re: Two questions....
Date: Tue, 3 Jun 2003 08:10:47 -0400 (EDT)

I do this all the time.  I've put some standard company headers into files 
(header.c, header.pl, etc.) and then just use C-x i to insert the file at 
the current point.  This works well for pre-existing files.  You could 
also record a simple macro and bind it to a key.  I also use auto-insert 
so I can have standard templates for any new *.c or *.pl files I create, 
which will then automaticlly contain the standard headers.
 

On Mon, 2 Jun 2003, Balaji Venkataraman wrote:

> >>>>> "Kai" == Kai Großjohann <kai.grossjohann@gmx.net> writes:
> 
>     Kai> Urban Gabor <gabaux@freemail.hu> writes:
> 
>     >> 2. I generaly do C/C++ and Perl editing with emacs. It would be very
>     >> convenient to ha a generic macro, which insert an empty comment in
>     >> the code.  My problem is, that the formar of the comment is dependig
>     >> on the programming language (mode) you use. Is there a genereal
>     >> solution?
> 
>     Kai> I hit M-;.  (This is new in Emacs 21.)  -- This line is not blank.
> 
> If I understand Urban correctly, he wants to insert a new comment block -
> like say some header text - he does not want to know how to (un)comment
> existing lines etc.
> 
> Meaning if I'm in C mode I want to say "M-x insert-my-header" and it does
> 
> // Filename: 
> // Date started:
> 
> but in Perl mode it does
> 
> # Filename:
> # Date started:
> 
> At least that's what I've wished for a while. Thought I'd learn enough elisp
> to write a function to do that. But when is the question!
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]