unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lawrence Mitchell <wence@gmx.li>
To: 8150@debbugs.gnu.org
Subject: bug#8150: 23.2; cperl-uncomment-region is NOT an inverse of cperl-comment-region
Date: Fri, 17 Feb 2012 12:47:10 +0000	[thread overview]
Message-ID: <87d39dsk35.fsf@ed.ac.uk> (raw)
In-Reply-To: <m3tyfkecw2.fsf@e4300lm.epcc.ed.ac.uk> (Lawrence Mitchell's message of "Thu, 03 Mar 2011 10:06:53 +0000")


I'm chasing up open bugs I've participated in, probably too late
for 24.1, but just to see if anything's doing.  Is there any
objection to applying the patch in this bug report?

Lawrence Mitchell wrote:

[...]

> Note that the problem is that (uncomment-region A B 1) is not the
> inverse of (comment-region A B 1).  Irrespective of the major
> mode in effect:

> emacs -Q

> C-x h
> C-1 M-x comment-region RET
> C-x h
> C-1 M-x uncomment-region RET

> Note how there is now a space at the beginning of every line in
> the *scratch* buffer.

> This is due to the following code in uncomment-region-default:

> |	  (if (null arg) (delete-region (point-min) (point))
> |	    (skip-syntax-backward " ")
> |	    (delete-char (- numarg))

>    # foo bar
>      ^ point is here when the above code is called.

> If an argument is supplied, arg is non-nil and so to delete the
> comment we first move backwards over whitespace and then delete
> as many comment characters as specified by the argument (1 in
> this case).






  reply	other threads:[~2012-02-17 12:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02  8:52 bug#8150: 23.2; cperl-uncomment-region is NOT an inverse of cperl-comment-region Dima Kogan
2011-03-02 17:30 ` Glenn Morris
2011-03-03  4:38   ` Dima Kogan
2011-03-03 10:06     ` Lawrence Mitchell
2012-02-17 12:47       ` Lawrence Mitchell [this message]
2012-02-17 15:45         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d39dsk35.fsf@ed.ac.uk \
    --to=wence@gmx.li \
    --cc=8150@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).