|
From: | martin rudalics |
Subject: | Re: How to use c-style to comment a region? |
Date: | Thu, 10 May 2007 23:40:24 +0200 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
> I'm not sure I understand the problem (and hence the solution). Can you > show me a recipe to reproduce this problem? Sorry for being cryptic. With emacs -Q customize `comment-style' to box or box-multi. In *scratch* insert (foo bar baz) set the region around bar and do `comment-region'. Gets you (foo ;; bar ;; baz) instead of (foo ;; bar ;; baz) Responsible is the (when block (unless ce (setq ce (comment-string-reverse cs)))) line in `comment-region-internal' which makes the subsequent (unless (or ce (eolp)) (insert "\n") (indent-according-to-mode)) fail. Obviously it fails in the cpp example of the OP as well.
[Prev in Thread] | Current Thread | [Next in Thread] |