Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit customizable addition of rcirc-styles-map to rcirc-mode-map #7

Open
aaron-em opened this issue Jan 9, 2016 · 2 comments
Open
Milestone

Comments

@aaron-em
Copy link
Owner

aaron-em commented Jan 9, 2016

Once the new features in #4 and #5 ship, there'll be a need for some straightforward way of adding them to rcirc-mode map which doesn't require manually doing so via Lisp.

Right now it looks like this would be best implemented as:

  • a defcustom allowing the keyseq to be specified;
  • a set function on same which will:
    • if replacing a binding which was already bound before we got to it, restore the prior binding
    • if a binding already exists in rcirc-mode-map on the given keyseq, capture it for later restoration as above
    • finally, bind rcirc-styles-map to the new key sequence in rcirc-mode-map

This way, we don't stomp all over rcirc-mode-map every time the user changes the prefix. We could even, in theory, actually hang the prior binding off a keyseq in rcirc-styles-map, so that it's still accessible via key sequence even after we've done our thing.

@benma
Copy link

benma commented Jan 9, 2016

Why is this issue an issue? I won't stop you from implementing it, but I am not sure how many users will benefit from being able to customize the prefix via Emacs' customization interface.

I think doing it the lisp way is fine for now. Up to you, of course.

@aaron-em
Copy link
Owner Author

I don't want to just unilaterally pick something and bind to it because I don't own rcirc-mode-map, and (potentially) blowing away one of its pre-existing bindings would be rude. I don't suppose there's any overwhelming reason why it needs to have a customization instead of just having the user drop a define-key form into her init file, but why not make the option available? It's not as though a defcustom is hard to write.

On the other hand, this isn't exactly related to what I'm doing in #4 and #5, and I want to go ahead and get that functionality into master, so I broke this out into a separate ticket for later attention.

@aaron-em aaron-em added this to the 1.4 milestone Jan 12, 2016
@aaron-em aaron-em modified the milestone: 1.4 Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants