|
From: | kgold |
Subject: | Re: Yet another rookie question replace-regexp |
Date: | Wed, 08 Mar 2006 17:56:56 -0500 |
User-agent: | Mozilla/5.0 (X11; U; AIX 000C89FF4C00; en-US; rv:1.7) Gecko/20040617 |
The general problem with M-x comment-region is that it doesn't handle lines with comments. You get something like: /* int i; /* comment */*/Personally, I like #if 0 for commenting out large chunks, using this function.
; function to comment a region using #if 0 (defun if0-region (p1 p2) (interactive "r") (let* () (goto-char p1) (beginning-of-line) (insert "#if 0\n") (goto-char (+ p2 +9)) (beginning-of-line) (insert "#endif\n"))) Hans-Christoph Wirth wrote:
billy <bp1497@att.com> wrote:If I want to comment out a 50 lines of 10k I don't want to comment out each line one at a time. I would like to do C-space bar them move below the last line I want to effect, the doM-x comment-region
[Prev in Thread] | Current Thread | [Next in Thread] |