根据emacs信息页面,下面是如何启用iswitchb模式:
以启用Iswitchb模式、键入
M-x iswitchb-mode或将变量iswitchb-mode自定义为t
因此,我将以下内容放在我的.emacs中:
(setq iswitchb-mode t)然而,这似乎不起作用。在搜索emacs wiki之后,我发现我需要使用以下内容:
(iswitchb-mode 1)有人能解释一下我为什么要这样启用它吗?我希望更好地理解elisp,而不仅仅是从地方复制和粘贴东西。
发布于 2009-09-14 14:16:02
通常,模式将同时定义变量和具有相同名称的函数。当调用变量时,函数将正确地设置变量,但打开模式的是函数,而不仅仅是变量(只跟踪模式的状态)。
在您的具体情况下,您被告知定制变量,但您只需设置它。区别在于,当变量的值发生变化时,定制知道要做什么,而“`setq”对此一无所知。如果查看该变量的帮助(C iswitchb模式),您将得到:
iswitchb-mode is a variable defined in `iswitchb.el'.
Its value is t
Documentation:
Non-nil if Iswitchb mode is enabled.
See the command `iswitchb-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `iswitchb-mode'.
You can customize this variable.https://stackoverflow.com/questions/1421688
复制相似问题