[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: commenting lines
From: |
Greg Hill |
Subject: |
Re: commenting lines |
Date: |
Tue, 2 Jul 2002 11:03:53 -0700 |
Gareth,
I have the following in my .emacs, which I use for that sort of
thing. Just set mark at the beginning of the first line you want to
comment out, move point to the beginning of the last line, invoke the
command, and type in the string you want to use as a comment.
(global-set-key [?\C-\A-\M-s] (lambda (string start end)
(interactive "sString: \nr")
(string-rectangle start
end string)))
I use the following for removing those comments. Set mark at the
beginning of the first line you want to uncomment, move point to the
last line just after the last character of the comment, and invoke
the command.
(global-set-key [?\C-\A-\M-d] (lambda (start end)
(interactive "r")
(delete-rectangle start end)))
--Greg
At 12:59 PM +0100 7/2/02, Gareth Walker wrote:
Hi all -- I know it is possible to comment out text in Emacs with
`comment-region', but is it possible to specify what goes at the
beginning of each line? I would like to `label' regions of my text
files with different things.
best wishes
Gareth
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs