|
|
|
|
|
by dded
4569 days ago
|
|
> the first command I wrote was "comment-or-uncomment-region-or-line" verilog-mode (and I imagine others) includes something like this this. C-c C-c comments region, and C-c C-u uncomments it. It handles embedded /* */-style embedded comments intelligently. |
|
1. if there is no region active and current line is not commented - comment it
2. if there is no region active and current line is commented - uncomment it
3. if there is region active and it's fully commented - uncomment that region
4 otherwise comment the full region
And it's this easy to do this:
So I see absolutely no reason for not coding this up and using it :) (Other than, heck, it really is my first ELisp function and it shows :D)