任何了解 Lisp 的人都可以帮助解决这个警告吗?
我升级到 Emacs 24.3,每当我使用 Emacs 创建 Python 文件时,都会收到此警告消息。搜索python.el
并找到以下产生警告的代码部分:
(let ((indentation (when block-end
(goto-char block-end)
(python-util-forward-comment)
(current-indentation))))
(if indentation
(set (make-local-variable 'python-indent-offset) indentation)
(message "Can't guess python-indent-offset, using defaults: %s"
python-indent-offset)))
这是我的.emacs
设置:
(setq-default c-basic-offset 4
tab-width 4
indent-tabs-mode nil)
(add-hook 'c-mode-common-hook
(lambda ()
(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-close 0)))
(add-hook 'python-mode-hook
(lambda ()
(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-close 0)))