Christian Podlasly <christian.podlasly(a)freenet.de> wrote:
================================================================
Dear Bug Team!
Xemacs seems to fail on the Mx uncomment-region commnd on cc-mode or c-mode:
Creating a comment with the 'Mx comment-region' command results in following
lines
/* void printVersion(void) */
/* { */
/* printf(stderr,"%s %s - blablub\n", progName, progVersion); */
/* } */
But using 'Mx uncomment-region' will not eliminate the comment strings
properly.
/ void printVersion(void) /
/ { /
/ printf(stderr,"%s %s - blablub\n", progName, progVersion); */
/ } /
This bug occurs in a linux environment as well under win2k, using the
xemacs-21.5.17 precompiled version
from /pub/xemacs/binaries/win32/installshield.
Thanks for the report, Christian. I can confirm this bug. It appears
to be due to the block of code in newcomment.el following this comment:
;; XEmacs: Add the following clause
;; if user didn't specify how many comments to remove, be smart
;; and remove the minimal number that all lines have. that way,
;; comments in a region of Elisp code that gets commented out will
;; get put back correctly.
And, of course, what you are seeing is the result of removing the
minimum number of characters. Removing that block makes the bug go
away. Furthermore, with that block of code gone, I get the comments in
a region of Elisp code that was commented out put back correctly with
M-x uncomment-region, so it appears to be unnecessary in the first
place.
It looks to me like that block of code should just go. I'll submit a
patch.
--
Jerry James, Assistant Professor james(a)xemacs.org
Computer Science Department
http://www.cs.usu.edu/~jerry/
Utah State University