vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
709 stars 40 forks source link

How to remap keys for `sx-question-list-mode` #333

Closed ztlevi closed 6 years ago

ztlevi commented 6 years ago

I'm trying to remap keys for sx-question-list-mode, but it's not working.

Here is the code I'm using.

    (with-eval-after-load 'sx-question-list-mode
      (progn
        (define-key sx-question-list-mode-map "j" 'sx-question-list-next)
        (define-key sx-question-list-mode-map "k" 'sx-question-list-previous)
        ))

This actually works if I evaluate the define-key manually by C-x C-e after sx-question-list-mode enabled.

Does anyone what's going on here?

Thanks~

vermiculus commented 6 years ago

The feature name is sx-question-list, not sx-question-list-mode :-)

See the documentation for with-eval-after-load for details.

ztlevi commented 6 years ago

Oh, that's right. Thanks!