3

任何移动命令都会导致 minibuffer 中的 eldoc 消息闪烁。禁用邪恶模式可以消除闪烁。

从 eldoc 文档中,我找到了这个相关的片段。

;; This function goes on pre-command-hook for XEmacs or when using idle
;; timers in Emacs.  Motion commands clear the echo area for some reason,
;; which make eldoc messages flicker or disappear just before motion
;; begins.  This function reprints the last eldoc message immediately
;; before the next command executes, which does away with the flicker.
;; This doesn't seem to be required for Emacs 19.28 and earlier.
(defun eldoc-pre-command-refresh-echo-area ()
  (and eldoc-last-message
       (if (eldoc-display-message-no-interference-p)
           (eldoc-message eldoc-last-message)
         (setq eldoc-last-message nil))))

如何防止启用邪恶模式的闪烁?

4

1 回答 1

2

所以,邪恶模式是无辜的。罪魁祸首是key-chord.el

按下 中存在的键时,显示屏会闪烁key-chord-define。我将“jk”绑定到keyboard-quit,所以每次按jork时,eldoc 都会闪烁。

(key-chord-define-global "jk" 'keyboard-quit)

这不是邪恶模式中的错误。h由于像and这样的单字母命令,它在邪恶模式下更加明显j

我在https://github.com/jschaf/key-chord上修补了 key-chord以修复闪烁。有关实际修复,请参阅提交 a2f6c61

于 2014-09-14T19:25:16.513 回答