【发布时间】:2013-09-17 16:52:47
【问题描述】:
任何了解 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)))
【问题讨论】:
-
不要引用你的 lambda,它充其量是没用的。
标签: python python-2.7 emacs elisp indentation