【问题标题】:Emacs - evil-mode causes flicker in eldoc-modeEmacs - evil-mode 导致 eldoc-mode 闪烁
【发布时间】:2014-11-07 20:51:31
【问题描述】:

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

从 eldoc 文档中,我找到了这个相关的 sn-p。

;; 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))))

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

【问题讨论】:

    标签: emacs elisp evil-mode


    【解决方案1】:

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

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

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

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

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

    【讨论】:

      猜你喜欢
      • 2013-12-24
      • 1970-01-01
      • 1970-01-01
      • 2014-10-21
      • 1970-01-01
      • 2012-07-29
      • 1970-01-01
      • 1970-01-01
      • 2010-11-17
      相关资源
      最近更新 更多