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

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

Re: How to uncomment Perl program in emacs?


From: Edward O'Connor
Subject: Re: How to uncomment Perl program in emacs?
Date: Thu, 18 Aug 2005 15:37:06 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (darwin)

> Can anyone please help me to find a better way to comment/uncomment
> Perl codes, just like what can be done for C codes? Thanks a lot for
> your help!

The command `comment-dwim' might do what you want, but note that its
dwimmish behavior depends on `transient-mark-mode' being enabled.

,----[ C-h f comment-dwim RET ]
| comment-dwim is an interactive compiled Lisp function in `newcomment'.
| (comment-dwim ARG)
| 
| Call the comment command you want (Do What I Mean).
| If the region is active and `transient-mark-mode' is on, call
|   `comment-region' (unless it only consists of comments, in which
|   case it calls `uncomment-region').
| Else, if the current line is empty, insert a comment and indent it.
| Else if a prefix ARG is specified, call `comment-kill'.
| Else, call `comment-indent'.
`----


Ted

-- 
Edward O'Connor
hober0@gmail.com

Ense petit placidam sub libertate quietem.





reply via email to

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