PATCH 21.5
As discussed in xemacs-beta message
<200603152052.45409.christian.podlasly(a)freenet.de> and its followup,
this block of code not only does nothing useful, it breaks
uncomment-region on C code.
lisp/ChangeLog addition:
2006-03-15 Jerry James <james(a)xemacs.org>
* newcomment.el (uncomment-region): Remove old code that breaks
uncomment-region on C files. Thanks to Christian Podlasly for the
report.
xemacs-21.5 source patch:
Diff command: cvs -q diff -uN
Files affected: lisp/newcomment.el
Index: lisp/newcomment.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/newcomment.el,v
retrieving revision 1.3
diff -d -u -r1.3 newcomment.el
--- lisp/newcomment.el 2005/01/26 09:57:14 1.3
+++ lisp/newcomment.el 2006/03/16 00:55:26
@@ -652,26 +652,6 @@
(goto-char beg)
(setq end (copy-marker end))
- ;; 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.
- (if (null arg)
- (let ((min-comments 999999))
- (while (not (eobp))
- (let ((this-comments 0))
- (while (looking-at (regexp-quote comment-start))
- (incf this-comments)
- (forward-char (length comment-start)))
- (if (and (> this-comments 0) (< this-comments min-comments))
- (setq min-comments this-comments))
- (forward-line 1)))
- (if (< min-comments 999999)
- (setq arg (list min-comments)))
- (goto-char beg)))
-
(let* ((numarg (prefix-numeric-value arg))
(ccs comment-continue)
(srei (comment-padright ccs 're))
--
Jerry James, Assistant Professor james(a)xemacs.org
Computer Science Department
http://www.cs.usu.edu/~jerry/
Utah State University