2

css-mode で abbrev-mode をオフにするにはどうすればよいですか? .emacs にこのコードがありますが、動作しません。

(add-hook 'css-mode-hook (lambda () (abbrev-mode 0)))
4

1 に答える 1

2

マニュアルから:

 The mode command should accept one optional argument.  If called
 interactively with no prefix argument, it should toggle the mode
 (i.e., enable if it is disabled, and disable if it is enabled).  If
 called interactively with a prefix argument, it should enable the
 mode if the argument is positive and disable it otherwise.

そう:

(add-hook 'css-mode-hook (lambda () (abbrev-mode -1)))

elisp からも引用info

 Disabling a minor mode in a mode hook is a little uglier:

      (add-hook 'text-mode-hook (lambda () (foo-mode -1)))

 However, this is not very commonly done.
于 2013-10-01T06:06:09.977 に答える