我想要 find-tag
自动接受默认选项(即点的词)并在没有提示的情况下跳转到标签位置。
这可能吗?
我还使用了 Emacswiki 中推荐的 find-tag 版本,在匹配的情况下会重新运行 ctags。所以我想要这样的东西:
is current word a known tag?
-> yes: jump to it without further confirmation
-> no: rerun ctags
is it known now?
-> yes: jump to it without further confirmation
-> no: prompt user for input
谢谢!
最佳答案
这是 Google 上“查找标签 emacs 无提示”的热门搜索词之一。对于简单版本 - 没有海报提到的 ctag-regeneration 逻辑 - 似乎关键是:
(find-tag (find-tag-default))
所以,对我来说,这有效:
(defun find-tag-no-prompt ()
"Jump to the tag at point without prompting"
(interactive)
(find-tag (find-tag-default)))
;; don't prompt when finding a tag
(global-set-key (kbd "M-.") 'find-tag-no-prompt)
关于emacs - 在 Emacs 中自动跳转到标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12074897/