GNU bug report logs -
#8150
23.2; cperl-uncomment-region is NOT an inverse of cperl-comment-region
Previous Next
Reported by: Dima Kogan <dkogan <at> cds.caltech.edu>
Date: Wed, 2 Mar 2011 08:53:01 UTC
Severity: minor
Found in version 23.2
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
Message #22 received at 8150-done <at> debbugs.gnu.org (full text, mbox):
> 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?
I've simplified the patch and installed it (see below),
Stefan
--- lisp/newcomment.el 2012-01-19 07:21:25 +0000
+++ lisp/newcomment.el 2012-02-17 15:41:15 +0000
@@ -872,14 +872,15 @@
(when (and sre (looking-at (concat "\\s-*\n\\s-*" srei)))
(goto-char (match-end 0)))
(if (null arg) (delete-region (point-min) (point))
- (skip-syntax-backward " ")
+ (let* ((opoint (point-marker))
+ (nchar (skip-syntax-backward " ")))
(delete-char (- numarg))
- (unless (or (bobp)
+ (unless (and (not (bobp))
(save-excursion (goto-char (point-min))
(looking-at comment-start-skip)))
;; If there's something left but it doesn't look like
;; a comment-start any more, just remove it.
- (delete-region (point-min) (point))))
+ (delete-region (point-min) opoint))))
;; Remove the end-comment (and leading padding and such).
(goto-char (point-max)) (comment-enter-backward)
This bug report was last modified 13 years and 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.