I have the following keymap defined to navigate my Emacs windows:
(defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")
(define-key my-keys-minor-mode-map (kbd "C-M-j") 'windmove-left)
(define-key my-keys-minor-mode-map (kbd "C-M-l") 'windmove-right)
(define-key my-keys-minor-mode-map (kbd "C-M-i") 'windmove-up)
(define-key my-keys-minor-mode-map (kbd "C-M-k") 'windmove-down)
(define-key my-keys-minor-mode-map (kbd "C-M-u") 'toggle-maximize-buffer)
(define-minor-mode my-keys-minor-mode
"A minor mode so that my key settings override annoying major modes."
t " my-keys" 'my-keys-minor-mode-map)
(my-keys-minor-mode 1)
This works great, except when I am viewing a PDF (DocView
). In that case, Whenever I press any of the shortcuts I get errors like:
Wrong type argument: wholenump, -56
What could be going on?
In case it helps I am using GNU Emacs on OS X. I installed with the following command, as suggested in this other answer:
brew install emacs --HEAD --use-git-head --cocoa --with-gnutls --with-rsvg --with-imagemagick
My version specifically is:
GNU Emacs 24.4.50.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F34))
of 2014-09-27 on josh.host.net
Could this be a bug? Or perhaps am I not defining this keymap correctly?