unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Edward O'Connor <hober0@gmail.com>
Subject: Re: How to uncomment Perl program in emacs?
Date: Thu, 18 Aug 2005 15:37:06 -0700	[thread overview]
Message-ID: <m2y86y50tp.fsf@roisin.local> (raw)
In-Reply-To: 1124400239.825424.94340@f14g2000cwb.googlegroups.com

> 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.

  parent reply	other threads:[~2005-08-18 22:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18 21:23 How to uncomment Perl program in emacs? Andy
2005-08-18 22:13 ` David Hansen
2005-08-19  2:45   ` Andy
2005-08-19  3:32     ` Henrik Enberg
2005-08-18 22:37 ` Edward O'Connor [this message]
     [not found] ` <mailman.4248.1124405039.20277.help-gnu-emacs@gnu.org>
2005-08-19  2:49   ` Andy
2005-08-19  7:16 ` ht000
2005-08-19  8:44 ` Alan Mackenzie
2005-08-19 16:06   ` Andy
2005-08-19 10:53 ` Michael Cadilhac
  -- strict thread matches above, loose matches on Subject: below --
2005-08-19  4:09 Dave Humphries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y86y50tp.fsf@roisin.local \
    --to=hober0@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).