From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: one key-press to comment out lines of code? Date: Wed, 30 Apr 2014 09:22:08 -0700 (PDT) Message-ID: <2e10f82a-87c5-4c44-9495-cdd417dd9ade@default> References: <87fvku94ms.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398874977 31350 80.91.229.3 (30 Apr 2014 16:22:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2014 16:22:57 +0000 (UTC) To: Sharon Kimble , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 30 18:22:46 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WfXHP-0000cp-Eg for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 18:22:43 +0200 Original-Received: from localhost ([::1]:57827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfXHO-0005Nz-U0 for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 12:22:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfXH4-0005NW-MG for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 12:22:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfXGv-0002lk-RD for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 12:22:22 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:18884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfXGv-0002lX-Kf for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 12:22:13 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s3UGM9WA000981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Apr 2014 16:22:10 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3UGM8rn015927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Apr 2014 16:22:09 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3UGM8jC015917; Wed, 30 Apr 2014 16:22:08 GMT In-Reply-To: <87fvku94ms.fsf@skimble.plus.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97485 Archived-At: > Whilst I'm still learning emacs and gnus I'm constantly adding code to my > "setup-testbed.el" file, and then finding later that it doesn't do what i= ts > expected to do, or I don't like the outcome, so I then comment it > out. Currently, I'm doing it laboriously by hand, but is it possible to > highlight it and then with one key-press insert ";" in front of each and > every > line of the code please? >=20 > I haven't seen this ability anywhere, but being able to do it would make > things a whole lot easier for me, so, can it be done please folks? Others will no doubt tell you to use `M-;' (`comment-dwim') after selecting the text. I prefer to use `comment-region', which I bind to `C-x ;'. To uncomment, provide a plain prefix arg (`C-u'): `C-u C-x ;'. To comment using N comment chars, use a numeric prefix arg: `C-3 C-x ;'. (And you can use that to nest commented text.)