From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Denis Bueno Newsgroups: gmane.emacs.help Subject: Re: Delete comments in region Date: Fri, 21 Apr 2006 21:30:48 -0400 Message-ID: <44498748.9000905@stygian.net> References: <44497B6E.8090900@gmail.com> <87acaeo1wz.fsf@sdf.lonestar.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145669474 18133 80.91.229.2 (22 Apr 2006 01:31:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2006 01:31:14 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 22 03:31:07 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FX6xi-0005rP-4v for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Apr 2006 03:31:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FX6xh-0005WF-Bi for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2006 21:31:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FX6xX-0005Va-BM for help-gnu-emacs@gnu.org; Fri, 21 Apr 2006 21:30:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FX6xW-0005VK-19 for help-gnu-emacs@gnu.org; Fri, 21 Apr 2006 21:30:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FX6xV-0005VD-TI for help-gnu-emacs@gnu.org; Fri, 21 Apr 2006 21:30:49 -0400 Original-Received: from [64.233.184.230] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FX6zB-0006L6-Pp for help-gnu-emacs@gnu.org; Fri, 21 Apr 2006 21:32:33 -0400 Original-Received: by wproxy.gmail.com with SMTP id i5so747565wra for ; Fri, 21 Apr 2006 18:30:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=UFumIGVYNrgpP4Kmc0HL24Ao3Hens9MgwNnOfEipHEDaZIdSiSDKwUs+iq7KxB1PFUQ/WC3EApiqPYw5SSs0hmYZyHwpkY8pZA0vEGlNcRSkVqT0s4aHQLL9cDY4QpDAWPdueHeGhSQc06VYrC3fdN/459NrD8aq1e6BYOXacRQ= Original-Received: by 10.54.154.8 with SMTP id b8mr1178610wre; Fri, 21 Apr 2006 18:30:48 -0700 (PDT) Original-Received: from ?192.168.1.100? ( [24.98.133.73]) by mx.gmail.com with ESMTP id 9sm412598wrl.2006.04.21.18.30.48; Fri, 21 Apr 2006 18:30:48 -0700 (PDT) User-Agent: Thunderbird 1.5 (Macintosh/20051201) Original-To: Nikos Apostolakis In-Reply-To: <87acaeo1wz.fsf@sdf.lonestar.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:34565 Archived-At: Nikos Apostolakis wrote: > Denis Bueno writes: > >> Does anyone have any elisp lying around that will, in any coding >> mode, remove all the comments from the region? >> > > Isn't "M-x uncomment-region" or "M-x comment-dwim" good enough? > I now see an ambiguity in my wording I didn't before. I want to *zap* the comment entirely. Delete the comment syntax and the text of the comment itself. Not just remove the comment syntax around the comment text. However, I figured out one way, but, it doesn't seem like the best way. ;; the following keys should all be entered in succession, but ;; they are commented for ease of viewing C-x ( ; start macro M-x kill-comment RET C-x ) ;; Then, on the code whose comments need to be zapped: C-x e e e e e e ;;; as many e's as necessary -Denis