当我设置变量时M-x customize
,值将存储在我的.emacs
文件中这个自动生成的按字母排序的大型列表中.
问题是我想记录为什么我选择特定值而不是特定变量的默认值.如果我通过在自动生成的列表中添加elisp注释来实现这一点,那么下次我自定义另一个变量时它们就会被破坏.
有没有办法Custom
保持我的评论,还是有其他标准的方法来注释这个?
就个人而言,我将所有设置从自定义中移出到我的.emacs文件中.主要是因为我真的不喜欢自定义UI.
所以,而不是这是我的自定义文件:
(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(scheme-program-name "scheme") '(tetris-use-glyphs nil))
我有:
(setq scheme-program-name "scheme" ; because I like it tetris-use-glyphs nil) ; it's an example
也就是说,custom-set-variable确实需要一些参数,其中一个是注释.所以你可以这样做:
(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(scheme-program-name "scheme" nil nil "this is a comment") '(tetris-use-glyphs nil nil nil "This is another comment"))
只有当您更改变量的值时,注释才会被吹走,而不是在您更改其他变量时.我不确定这是否适用于此. C-h f custom-set-variables
有更多信息.