Hi,
the new code in newcomment.el does one unpleasant thing. Adding and
removing from comments does not exactly the same. The value of
`comment-padding' gets inserted in between comment and code but is not
removed.
Eg.:
(defun foo ()
(bar baz))
becomes with `comment-region'
; (defun foo ()
; (bar baz))
but if I now remove the comment (with `C-u M-x comment-region' or
`uncomment-region') I have to read:
(defun foo ()
(bar baz))
The space is `comment-padding'. This simple patch tries to solve that
problem.
Index: newcomment.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/newcomment.el,v
retrieving revision 1.1
diff -u -r1.1 newcomment.el
--- newcomment.el 2003/03/02 09:38:40 1.1
+++ newcomment.el 2003/05/23 17:26:19
@@ -681,6 +681,7 @@
(goto-char (match-end 0)))
(if (null arg) (delete-region (point-min) (point))
(skip-syntax-backward " ")
+ (delete-char (length comment-padding))
(delete-char (- numarg)))
;; Remove the end-comment (and leading padding and such).
bye
Karl
--
Increasingly, people seem to misinterpret complexity as
sophistication, which is baffling -- the incomprehensible should cause
suspicion rather than admiration. Possibly this trend results from a
mistaken belief that using a somewhat mysterious device confers an
aura of power on the user. -- Niklaus Wirth