|
From: | William Xue |
Subject: | Re: How to use c-style to comment a region? |
Date: | Fri, 11 May 2007 10:04:47 +0800 |
User-agent: | Opera Mail/9.20 (Win32) |
> That's not my request, I only want a command or a keybinding. You could try to bind (defun my-cpp-comment-region (beg end &optional arg) (interactive "*r\nP") (let ((comment-start "/* ") (comment-end " */")) (comment-region beg end arg))) to a key.
I bind it to C-; and it works very well. Thank you very much!
BTW with comment-styles box / box-multi and newline terminated comment syntax `comment-region' comments out the entire text from the beginning of the region till EOL. The attached patch should cure that.
-- Sincerely yours, William
[Prev in Thread] | Current Thread | [Next in Thread] |