I am trying to rebind some keys for info-mode
without success. I am not sure whether I am missing something, or whether a special hook is required. I am using the following hook in my init.el
:
(add-hook 'info-mode-hook
(lambda ()
(message "setting up info-mode")
(local-set-key (kbd "C-c l")
'info-last)
(local-set-key (kbd "g g")
'evil-goto-first-line)
(local-set-key (kbd "C-c g")
'info-goto-node)
)
)
But when I run C-h i
to open info-mode
, my custom bound keys above do not work and I do not get any message like "setting up info-modein my
Messages` buffer.
I have evaluated the above hook with an empty emacs config (emacs -q
), and I have many other mode hooks that are working fine.
Any suggestions to help troubleshoot or resolve this issue would be appreciated! I am happy to clarify anything as well.
Info-mode
;Info-mode-hook
. It's unfortunate that the author decided to break from tradition with lowercase letters, but that's how it goes sometimes. To see more, type:M-x find-library RET info RET
Some of the variables/functions are lowercase -- it's a hodge-podge mess if you ask me.C-h v major-mode
would tell youInfo-mode
, and that mode hooks are always the mode name with a-hook
suffix.