From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lgfang Newsgroups: gmane.emacs.bugs Subject: Re: comment-kill can't deal with following situation Date: Sun, 02 Mar 2008 21:49:01 +0800 Message-ID: <86hcfps0c2.fsf@163.com> References: <198A33EB1E9E344EBC566802C7761D6B4ACE3C@CNSHGSMBS04.ad4.ad.alcatel.com> <86tzjsqb47.fsf@163.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204465953 4272 80.91.229.12 (2 Mar 2008 13:52:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Mar 2008 13:52:33 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, lgfang To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 02 14:52:59 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVocX-0005dI-Iv for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Mar 2008 14:52:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVoc0-0003PU-Su for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Mar 2008 08:52:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVobv-0003MN-5F for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2008 08:52:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVobt-0003JP-Jl for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2008 08:52:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVobt-0003J6-Ai for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2008 08:52:13 -0500 Original-Received: from m12-12.163.com ([220.181.12.12]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JVobq-0004kn-Rg for bug-gnu-emacs@gnu.org; Sun, 02 Mar 2008 08:52:13 -0500 Original-Received: from fbbox (unknown [122.4.75.167]) by smtp8 (Coremail) with SMTP id DMCowLArV4vtsMpHMiDpHw==.24376S2; Sun, 02 Mar 2008 21:51:55 +0800 (CST) In-Reply-To: (Stefan Monnier's message of "Sun\, 02 Mar 2008 00\:14\:14 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) X-Coremail-Antispam: 1Uf129KBjvdXoW7GFykXry8KrW7Gw1kCFWrGrg_yoWDurc_W3 y3WrW8u3yayF4Ut3y7Zrsa9r97t3yDGryfZ3s5Xa4UX3yUGw48Gr4kCry7uF45Xr45Cr4D KFn5X3y8AryUujkaLaAFLSUrUUUUUbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnuIY1I k26cxK620vw7xCY7Wlc7Ca8VAvwVCjb41l5I8CrVACY4xI64kE6c02F40Ex7xfM7AC8VAF wI0_Jr0_Gr1l1I0E4x80FVCIwcAKzIAtM7C26IkvcIIF6IxKo4kEV4yl1IIY67AEw4v_Jr 0_Jr4lYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMx02cVAKzwCY 0x0Ix7I2Y4AK64vIr41l4x8a6c8ajcxJMI8E67AF67kF1VAFwI0_Jrv_JF1lb7Iv0xC_Jr 1lb4IE77IF4bIYCTnIWIevJa73UjIFyTuYvjxUwMKKUUUUU X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17637 Archived-At: >>>>> "Stefan" == Stefan Monnier writes: >> comment-kill is defined in newcomment.el. It is supposed to >> kill comments (refer to its document). But it can't deal with >> the cases in which there are more than one comment in a line. >> An example is: Stefan> If you do not provide a prefix arg, comment-kill should Stefan> only kill 1 comment. Indeed when providing a prefix arg, The document says: Kill the comment on this line, if any. With prefix ARG, kill comments on that many lines starting with this one. So, take following C code for example: int j; /* comment 1 */ int k; /* comment 2*/ I think comment-kill should kill both comment 1 and comment 2 even without prefix ARG. But in fact, it only kills the first one. Stefan> But in the presence of multi-line comments, the behavior Stefan> doesn't match the docstring either. Even if all comments reside in one line and call comment-kill either with/without prefix arg, the behavior is in-correct so long as there are more than one comments. Regards, -- Fang, lungang