emacs-devel
[Top][All Lists]
Advanced

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

Re: POC comment/uncomment region in nxml-mode


From: Stefan Monnier
Subject: Re: POC comment/uncomment region in nxml-mode
Date: Mon, 18 Aug 2014 11:31:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> Here's a POC for interactively commenting/uncommenting a region in
> nxml-mode. I guess if I wanted to submit this as an enhancement to
> nxml-mode I'd have to properly integrate the functions into nXML mode.
> Looking for motivation. Anyone interest in pursuing this?

IIUC, this is indeed needed, thank you.
A few comments, tho:
- It should not create new commands.  Instead it should set
  (un)comment-region-function buffer-locally.
- It should use the default (un)comment-region functions internally
  (e.g. first quote all "--", then call the default comment-region).
- I don't think you need to turn "--" into "\-\-".  Turning them into
  "-\-" should be sufficient.
- comment-region followed by an uncomment-region should also work on
  a region which already contains comments with a quoted "--"
  (i.e. with a "-\-").  For that I think you also need to quote "-\-" to
  "-\\-" and to unquote "-\\-" to "-\-" (and same for any number of
  backslashed between dashes).

Would you like to try to submit  revised patch?


        Stefan



reply via email to

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