[Top][All Lists]

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

Re: Two questions....

From: Rob Thorpe
Subject: Re: Two questions....
Date: 3 Jun 2003 06:05:31 -0700

Balaji Venkataraman <address@hidden> wrote in message news:<address@hidden>...
> >>>>> "Kai" == Kai Großjohann <address@hidden> writes:
>     Kai> Urban Gabor <address@hidden> 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!

In any particular mode this is given by the value of comment-start.

(insert comment-start "Filename:"  comment-end "\n")


reply via email to

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