Shouldn't define default key bindings with 'C-c' sequences

Issue #6 resolved
Yeolhyun Kwon
created an issue

The recent commit defines a minor mode with default key bindings. But I think it has conflicted with some other packages depending on nose.el.

The emacs manual says this:

Don't define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter >(either upper or lower case) are reserved for users; they are the only sequences reserved >for users, so do not block them. Changing all the Emacs major modes to respect this convention was a lot of work; >abandoning this convention would make that work go to waste, and inconvenience users. >Please comply with it.

Besides, I think that the minor mode should be defined with more care. It should check if the user enables the mode or not. As it is, the minor mode is enabled regardless of the user's intention.

Comments (9)

  1. Josiah Schwab

    The addition of these keybindings was extremely surprising, and as Yeolhyun says, against emacs conventions.

    I also experience that nose-mode appears to be on by default.

  2. Malcolm Purvis

    nose-mode is in by default because of a bug in the call to define-minor-mode. You can work around it by replacing the line:

    (define-minor-mode nose-mode "nosetests"


    (define-minor-mode nose-mode

  3. Joost Kremers

    That stops nose-mode from being activated globally, but it does not resolve the key binding issue. The key bindings that nose-mode sets up consist of C-c <letter>, which are reserved for the user and should therefore not be set by any mode.

    Minor modes should use key bindings starting with C-c followed by a punctuation character (except {}<>:;). Using C-c . as a general prefix would be a possibility.

  4. Augie Fackler repo owner

    Bluntly: nose-mode is optional, and it's encoding the proposed keybindings that have been documented for years.

    I don't feel strongly, so if you want them to change, you should really be sending a pull request with a detailed commit message. Bikeshedding on this bug isn't going to get me to do anything, because I don't use nose-mode anyway (I have my own f4-dwim binding that I've been using for years).

  5. Log in to comment