jlr / rainbow-delimiters

Emacs rainbow delimiters mode
http://www.emacswiki.org/emacs/RainbowDelimiters
112 stars 12 forks source link

Changes to support a global-rainbow-delimiters-mode #1

Closed snmishra closed 13 years ago

snmishra commented 13 years ago

I have made some changes to support a global-rainbow-delimiters-mode, on the lines of global-font-lock-mode. In fact, the code is copied from font-lock-core.el with all changes from font-lock to rainbow-delimiters. It works on my computer, but you may want to test too.

jlr commented 13 years ago

Satya,

Thank you very much for taking the time to do work and send it to me; please don't let my extended delay in response lead you to think I have any less appreciation for your efforts. I've been on a hiatus for some time now and haven't been working on any projects. My apologies for not getting back to you more quickly.

I haven't looked at the code yet. The idea however is a great one.

Here's how I'm going to handle this. I'm not sure how much effort is involved but I think from reading a bit about global font lock/minor modes, making it a global-font-lock-mode shouldn't involve too much work. Normally I would look at your code and likely pull it in but the thing is, I want to be absolutely sure that rainbow-delimiters remains in a state where it can be included in Emacs proper, which requires signing an FSF/Emacs contributor agreement (assigning copyright to FSF). So I'm going implement my own version of a global mode for rainbow-delimiters, and if you want to submit the contributor agreement, I'll then go back and look at your code, if it's workable pull out my own code and put in yours, and add your name as a contributor at the top of the file. I always want to show appreciation for people like you who send in patches.

The emacs contributor agreement info I have is from etc/CONTRIBUTING in emacs trunk:

We can accept small changes (roughly, fewer than 15 lines) without legal papers. Anything more substantial requires a copyright disclaimer or assignment (the latter is preferred, especially for larger changes). Both of these involved filling out a short form and filing it with the FSF. The process is straightforward -- contact us at emacs-devel@gnu.org to obtain the relevant forms.

Sorry I don't have a clearer link to the contributor form than that. I haven't signed the agreement myself yet; once the mode is ready I'll sign it and start the process of trying to get the mode included in Emacs.

I apologize for the inconvenience here but I've worked hard to optimize this mode for speed with the specific goal of making a mode that really solves the need for rainbow parens in emacs - it doesn't have all the features I want yet, but it's getting there. I think it's a commonly requested enough thing it may warrant inclusion in Emacs proper. So I'm being careful to ensure the code can be included in FSF Emacs.

Feel free to get in touch any time. Thank you for the suggestion and the pointer to font-lock-core.el. If you think of any other features, please do feel free to work on them and/or simply suggest them to me - I'd love to accept your code; I've just never submitted something to Emacs proper so I want to be a little careful until I understand more clearly how that process works.

Thanks again!

snmishra commented 13 years ago

On Fri, Sep 16, 2011 at 4:44 AM, jlr reply@reply.github.com wrote:

Satya,

Thank you very much for taking the time to do work and send it to me; please don't let my extended delay in response lead you to think I have any less appreciation for your efforts. I've been on a hiatus for some time now and haven't been working on any projects. My apologies for not getting back to you more quickly.

I haven't looked at the code yet. The idea however is a great one.

Here's how I'm going to handle this. I'm not sure how much effort is involved but I think from reading a bit about global font lock/minor modes, making it a global-font-lock-mode shouldn't involve too much work. Normally I would look at your code and likely pull it in but the thing is, I want to be absolutely sure that rainbow-delimiters remains in a state where it can be included in Emacs proper, which requires signing an FSF/Emacs contributor agreement (assigning copyright to FSF). So I'm going implement my own version of a global mode for rainbow-delimiters, and if you want to submit the contributor agreement, I'll then go back and look at your code, if it's workable pull out my own code and put in yours, and add your name as a contributor at the top of the file. I always want to show appreciation for people like you who send in patches.

The emacs contributor agreement info I have is from etc/CONTRIBUTING in emacs trunk:

  • Copyright Assignment

We can accept small changes (roughly, fewer than 15 lines) without legal papers.  Anything more substantial requires a copyright disclaimer or assignment (the latter is preferred, especially for larger changes).  Both of these involved filling out a short form and filing it with the FSF.  The process is straightforward -- contact us at emacs-devel@gnu.org to obtain the relevant forms.

Sorry I don't have a clearer link to the contributor form than that. I haven't signed the agreement myself yet; once the mode is ready I'll sign it and start the process of trying to get the mode included in Emacs.

I apologize for the inconvenience here but I've worked hard to optimize this mode for speed with the specific goal of making a mode that really solves the need for rainbow parens in emacs - it doesn't have all the features I want yet, but it's getting there. I think it's a commonly requested enough thing it may warrant inclusion in Emacs proper. So I'm being careful to ensure the code can be included in FSF Emacs.

Feel free to get in touch any time. Thank you for the suggestion and the pointer to font-lock-core.el. If you think of any other features, please do feel free to work on them and/or simply suggest them to me - I'd love to accept your code; I've just never submitted something to Emacs proper so I want to be a little careful until I understand more clearly how that process works.

Thanks again!

  • Jeremy Rayman jeremy.rayman@gmail.com

I am flattered by your detailed reply:)

I don't understand emacs much. So my solution for global rainbow delimiters mode is mostly a hack. I think I have had some trouble with my hack since I sent the pull request. Perhaps a pull-request was not the correct way of proposing the enhancement. Please feel free to implement in your way if you think it is useful.

Regards, Satya

Reply to this email directly or view it on GitHub: https://github.com/jlr/rainbow-delimiters/pull/1#issuecomment-2114001