这是我的.emacs文件的内容。
(add-hook 'php-mode-hook
(lambda ()
(c-set-style "bsd")
(setq indent-tabs-mode t)
(setq c-basic-offset 4)
(setq tab-width 4)
(c-set-offset 'arglist-close 'c-lineup-arglist-operators)
(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-cont-nonempty 'c-lineup-math)
(c-set-offset 'case-label '+)
))
我想将这些格式设置移动到项目特定目录。虽然我可以轻松地对setq语句进行操作(例如 setq (indent-tabs-mode t)),但是我无法对函数调用进行操作,例如:(c-set-offset 'arglist-intro '+)。
这是我放在我的.dir-locals.el中的内容:
;;; Directory Local Variables
;;; See Info node `(emacs) Directory Variables' for more information.
((php-mode
(c-set-style "bsd")
(indent-tabs-mode . t)
(c-basic-offset . 4)
(tab-width . 4)
(c-set-offset 'arglist-close 'c-lineup-arglist-operators)
(c-set-offset 'arglist-intro 'c-basic-offset)
(c-set-offset 'arglist-cont-nonempty 'c-lineup-math)
(c-set-offset 'case-label '+)
))
这里出了什么问题?