(elpy-enable)失败,“符号的函数定义为void:format-message”

时间:2016-04-20 06:10:50

标签: python emacs elpy

我正在尝试使用elpy并在我的~/.emacs.d/init.el中添加以下行:

(add-to-list 'package-archives '("elpy" . "http://jorgenschaefer.github.io/packages/"))
(package-initialize)

(defvar my-packages
  '(elpy))
(dolist (p my-packages)
  (when (not (package-installed-p p))
    (package-install p)))

(elpy-enable)

启动时,我收到消息“符号的函数定义为无效:格式消息”。还有其他人遇到过这个问题吗?

1 个答案:

答案 0 :(得分:0)

这最终成了我设置的问题。我也安装了python.el,这导致了以下调试器跟踪:

Debugger entered--Lisp error: (void-function format-message)
  (format-message "Add `%s' clause? " name)
  (let* ((name (symbol-name name)) (function-name (intern (concat "python-skeleton--" name))) (msg (format-message "Add `%s' clause? " name))) (if (not skel) (progn (setq skel (cons (quote <) (cons (format "%s:" name) (quote (n n > _ n))))))) (cons (quote define-skeleton) (cons function-name (cons (or doc (format "Auxiliary skeleton for %s statement." name)) (cons nil (cons (cons (quote unless) (cons ... ...)) skel))))))
  (closure (python-shell--interpreter-args python-shell--interpreter outline-heading-end-regexp view-return-to-alist t) (name doc &optional &rest skel) "Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL.\nThe skeleton will be bound to python-skeleton-NAME." (let* ((name (symbol-name name)) (function-name (intern (concat "python-skeleton--" name))) (msg (format-message "Add `%s' clause? " name))) (if (not skel) (progn (setq skel (cons (quote <) (cons (format "%s:" name) (quote ...)))))) (cons (quote define-skeleton) (cons function-name (cons (or doc (format "Auxiliary skeleton for %s statement." name)) (cons nil (cons (cons ... ...) skel)))))))(else nil)
  (python-define-auxiliary-skeleton else nil)
  eval-buffer(#<buffer  *load*-95724> nil "/Users/lakshmansankar/.emacs.d/elpa/python-0.25.1/python.el" nil t)  ; Reading at buffer position 170847
  load-with-code-conversion("/Users/lakshmansankar/.emacs.d/elpa/python-0.25.1/python.el" "/Users/lakshmansankar/.emacs.d/elpa/python-0.25.1/python.el" nil t)
  require(python)
  eval-buffer(#<buffer  *load*-866782> nil "/Users/lakshmansankar/.emacs.d/elpa/elpy-20160131.118/elpy.el" nil t)  ; Reading at buffer position 1541
  load-with-code-conversion("/Users/lakshmansankar/.emacs.d/elpa/elpy-20160131.118/elpy.el" "/Users/lakshmansankar/.emacs.d/elpa/elpy-20160131.118/elpy.el" nil t)
  (elpy-enable)
  eval-buffer(#<buffer  *load*> nil "/Users/lakshmansankar/.emacs.d/init.el" nil t)  ; Reading at buffer position 6634
  load-with-code-conversion("/Users/lakshmansankar/.emacs.d/init.el" "/Users/lakshmansankar/.emacs.d/init.el" t t)
  load("/Users/lakshmansankar/.emacs.d/init" t t)
  #[0 "�\205\262   \306=\203�\307�\310Q\202; \311=\204�\307�\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\nB�\321\202;\316\322�\323�\322\211#\210�\322=\203a\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203`��\210�\203\243\330�!\331\232\203\243\332�!\211\333P\334�!\203}\211\202\210\334�!\203\207�\202\210\314\262��\203\241\335��\"\203\237\336\337��#\210\340\341!\210��\266�\f?\205\260\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  command-line()
  normal-top-level()

删除python.el后,事情似乎有效。