bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comment-kill can't deal with following situation


From: lgfang
Subject: Re: comment-kill can't deal with following situation
Date: Sun, 02 Mar 2008 21:49:01 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix)

>>>>> "Stefan" == Stefan Monnier <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]