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: Commenting Multiple Lines Date: Sun, 18 Sep 2011 14:27:24 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1316381275 15401 80.91.229.12 (18 Sep 2011 21:27:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2011 21:27:55 +0000 (UTC) To: "'Nachiappan A'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 18 23:27:51 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Oty-0003bz-KB for geh-help-gnu-emacs@m.gmane.org; Sun, 18 Sep 2011 23:27:50 +0200 Original-Received: from localhost ([::1]:39747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Otx-000454-Vf for geh-help-gnu-emacs@m.gmane.org; Sun, 18 Sep 2011 17:27:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Ots-00044n-Vb for help-gnu-emacs@gnu.org; Sun, 18 Sep 2011 17:27:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5Otr-00084P-An for help-gnu-emacs@gnu.org; Sun, 18 Sep 2011 17:27:44 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:25210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Otr-00083s-5Z for help-gnu-emacs@gnu.org; Sun, 18 Sep 2011 17:27:43 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p8ILRao6026876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 18 Sep 2011 21:27:38 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p8ILRZXb019860 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Sep 2011 21:27:36 GMT Original-Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p8ILRUIo025739; Sun, 18 Sep 2011 16:27:30 -0500 Original-Received: from dradamslap1 (/10.159.36.189) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Sep 2011 14:27:30 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acx2Qr27Jno0UrMiTFSrriQbbtulawABJLcw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4E76624A.00A2:SCFMA922111,ss=1,re=-4.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 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:82261 Archived-At: > I use C-c C-c to comment multiple lines, to un-comment multiple > lines the tutorial says give negative argument and C-c C-c. > How to provide negative argument ? Deniz already answered your negative-argument question. But which command do you have bound to `C-c C-c'? (You can use `C-h k' to find out.) There are various ways to comment and uncomment multiple lines. One way is to use command `comment-dwim', bound by default to `M-;'. Jambunathan suggested using this. "DWIM" means "do what I mean", and the idea is that the command does different things in different contexts, but what it does is always the right thing (what you meant) for each context. FWIW, I find that "DWIM" is often misguided and presumptuous. It too often really means "do something the command author thought would be the right thing". Personally, I prefer to use command `comment-region', which I bind to `C-M-;'. With a plain prefix argument (i.e., `C-u') it uncomments the region. It's an old command, simple and dependable. It's not dwim: it never second-guesses you. Use `C-h f' to find out more about any given function (e.g., command).