[分享] 切换输入法时自动更换光标颜色

很好用,感谢分享!我在 change-cursor-color-on-input-method 函数的 if 里增加了两条断言,可以遵从 emacs-rime 中的 rime-disable-predicates 来改变光标颜色:

  (defun change-cursor-color-on-input-method ()
    "Set cursor color depending on whether an input method is used or not."
    (interactive)
    (set-cursor-color (if (and (rime--should-enable-p)
                               (not (rime--should-inline-ascii-p))
                               current-input-method)
                          input-method-cursor-color
                        default-cursor-color)))

5 个赞