From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: How to uncomment Perl program in emacs? Date: Fri, 19 Aug 2005 08:44:58 +0000 Organization: muc.de e.V. -- private internet access Message-ID: References: <1124400239.825424.94340@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1124446383 14773 80.91.229.2 (19 Aug 2005 10:13:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Aug 2005 10:13:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 19 12:12:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E63qE-00054n-8d for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Aug 2005 12:11:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E63tm-00041S-Tt for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Aug 2005 06:14:54 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news-stu1.dfn.de!news.belwue.de!informatik.tu-muenchen.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1124445517 57556 193.149.49.134 (19 Aug 2005 09:58:37 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 19 Aug 2005 09:58:37 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:133329 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28856 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28856 Andy wrote on 18 Aug 2005 14:23:59 -0700: > I am right now using GNU emacs 20.3.1 on solaris. First comment: that release is many years old; if you upgraded to a more recent release (currently, that's 21.4), you might well like the new features; there's little to dislike, and few, if any, compatibility problems. Also, if you have any more problems, the people who'll be helping you will know the current release much better than older ones. > I can comment and uncomment C codes by first simply highlighting the > codes, and then Control-c Control-c for comment or Control-u Control-c > Control-c for uncomment. > But I can't apply the above method to comment or uncomment Perl codes. > Alternatively, I can comment Perl codes by first highlighting the codes > then "M-x comment-region". OK, just a first check: You're using "Perl Mode", right? That is, on the mode line you see "(Perl)" just to the left of the line number? The thing is, there is at least one other mode ("CPerl Mode", I think) which can be used instead. > But I don't know how to uncomment Perl codes; at least, "M-x > uncomment-region" doesn't work. C-u M-x comment-region ;-) > 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! Put this in your .emacs: (eval-after-load "perl-mode" '(define-key perl-mode-map "\C-c\C-c" 'comment-region)) (DON'T miss out the tick at the beginning of the second line. It's important.) That should set up your mode so that you can use C-c C-c for perl. Just one proviso: I've tried all this in Emacs 21.3, not 20.3. It should probably work in the older version, though. > Andy -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").