如果我运行emacs --daemon
(in.xinitrc
或更高版本)然后emacsclient -c
,新创建的框架具有黑色光标颜色,无论 colortheme 或任何其他设置如何。更准确地说,在我输入任何内容之前,光标颜色为白色(或其他颜色),但第一次按键时,它变为黑色,无法通过set-cursor-color
. 默认和我的自定义颜色主题都是黑色的,因此编辑非常不舒服。
如果我运行emacs
,M-x server-start
而不是emacs --daemon
那么这个问题不会出现。但是这样我需要保留一个emacs“主”框架而不是偶然杀死它,这似乎不是一个好的解决方案。
我有以下块,.emacs.d/init.el
但它没有帮助:
(set-cursor-color "red")
(setq initial-frame-alist '((cursor-color . "red")))
(setq default-frame-alist '((cursor-color . "red")))
(add-hook 'window-setup-hook '(lambda () (set-cursor-color "red")))
(add-hook 'after-make-frame-functions '(lambda (f) (with-selected-frame f (set-cursor-color "red"))))
如果我跑步,M-x describe-face RET cursor
我会得到:
(...)
Defined in `faces.el'.
Family: unspecified
Foundry: unspecified
Width: unspecified
Height: unspecified
Weight: unspecified
Slant: unspecified
Foreground: unspecified
Background: black
Underline: unspecified
Overline: unspecified
Strike-through: unspecified
Box: unspecified
Inverse: unspecified
Stipple: unspecified
Font: unspecified
Fontset: unspecified
Inherit: unspecified