0

帮助模式下总是有链接,假设是通过<return>按钮输入的。由于我将<return>按钮重新映射到indent-and-new-line,因此我无法再输入链接。我想为输入按钮找到正确的键映射。

Help mode defined in `help-mode.el' (`help-mode'):
Major mode for viewing help text and navigating references in it.
Entry to this mode runs the normal hook `help-mode-hook'.
Commands:
key             binding
---             -------

C-c             Prefix Command
TAB             forward-button
  (that binding is currently shadowed by another mode)
RET             help-follow
  (that binding is currently shadowed by another mode)
ESC             Prefix Command
SPC             scroll-up-command

我从描述模式中得到了帮助。我试过了,help-follow但它不起作用。正确的键绑定应该是什么?

4

1 回答 1

2

默认情况下,RET在. 如果您喜欢使用啮齿动物,您还应该能够用您的主鼠标按钮单击链接。此功能不绑定到任何其他开箱即用的键。push-buttonhelp-mode

我不确定你是如何重新绑定RET的,但更有选择性地做它可能是有意义的。indent-and-new-line在大多数模式下可能有意义,但正如您所发现的,在某些情况下您可能需要默认行为。

也许你可以通过 来做到这一点prog-mode-hook,所以它只影响编程模式?

或者,您可以将其他一些键绑定到push-buttonin help-mode

顺便说一句,这是一个有用的技术,可以让你自己发现这个键绑定:

  1. 使用标志运行 Emacs-Q以禁止加载您的 init 文件和系统 init 文件。
  2. 激活一个使用 的缓冲区help-mode,例如通过使用C-h f message RET查看该message函数的文档,然后C-x o切换到帮助窗口。
  3. 按下C-h k RET以查看绑定的功能RET
于 2016-01-05T14:23:15.133 回答