help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to deal with comment in a new lang mode


From: Kevin Rodgers
Subject: Re: how to deal with comment in a new lang mode
Date: Sat, 01 Nov 2008 07:47:34 -0600
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Xah wrote:
...
(defun xlsl-uncomment-region (p1 p2)
  "Remove “//” in the beginning of each line of selected text."
  (interactive "r")
  (let ((deactivate-mark nil))
    (save-excursion
      (goto-char p2)
      (while (>= (point) p1)
        (xlsl-uncomment-current-line)
        (previous-line)
        )
      )
    )
  )

took me about 3 hours. Coding this i realized there's some details,
more complex than i originally thought but still not much work.
Possibly down the road i'll go back to basing it on “newcomment.el”.

PS is there a command to compact the ending parens?

C-M-% ) C-q C-j SPC + ) RET )) RET

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]