0

我正在尝试尝试 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)

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

4

1 回答 1

1

这最终成为我的设置问题。我也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,事情似乎工作。

于 2016-04-20T16:07:52.720 回答