我使用Python模式(而不是emacs 23附带的默认模式)。
我无法执行当前加载在emacs中的python程序。
我得到了“符号的功能定义为无效:智能-操作员-模式-on”错误。
任何提示或提示都可以生成python程序,它可以在emacs上运行并显示结果输出窗口?
在这里,emacs错误报告。
Debugger entered--Lisp error: (void-function smart-operator-mode-on)
(smart-operator-mode-on)
(lambda nil (set-variable (quote py-indent-offset) 4)
(set-variable (quote indent-tabs-mode) nil) (define-key py-mode-map (kbd "RET") (quote newline-and-indent)) (smart-operator-mode-on))()
run-hooks(python-mode-hook)
(if python-mode-hook (run-hooks (quote python-mode-hook)) (run-hooks (quote py-mode-hook))) python-mode()我的init_python.el脚本
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
(require 'python-mode)
(add-hook 'python-mode-hook
(lambda ()
(set-variable 'py-indent-offset 4)
;(set-variable 'py-smart-indentation nil)
(set-variable 'indent-tabs-mode nil)
(define-key py-mode-map (kbd "RET") 'newline-and-indent)
;(define-key py-mode-map [tab] 'yas/expand)
;(setq yas/after-exit-snippet-hook 'indent-according-to-mode)
(smart-operator-mode-on)
))发布于 2010-01-09 07:08:13
它在关机(智能操作员模式)之后工作,我需要了解如何解决智能操作员模式的问题。
(setq调试上的错误t)帮助我发现错误。谢谢努法尔。
发布于 2011-09-21 19:10:50
通过将smart-operator.el文件下载到加载路径并在调用smart-operator-mode-on之前添加require 'smart-operator',我修复了这个错误。
https://stackoverflow.com/questions/2032476
复制相似问题