1

OK 我知道 ILISP 已经不再开发了,但是 SLIME 没有 ILISP 的一些特性,即自动补全、突出显示用户定义的函数、用户函数的参数列表提示等

我在这个地方找到了一个更新的 ILISP 包存储库。我在 Linux 上使用 SBCL。我不得不编辑ilcompat.el和添加

   ((string-match "^24" emacs-version)
         'fsf-23)

使其与 Emacs 24.x 一起编译。它确实编译了大量警告。然后按照INSTALLATION文档,我添加(load "ilisp/ilisp.emacs")到我的~/.emacs文件中。;

但是在emacs启动时,我得到一个错误。我不知道emacs足以解决这个问题??

Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50cmake-data.el (source)...done
Loading /etc/emacs/site-start.d/50devhelp.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50gcl.el (source)...done
Loading /etc/emacs/site-start.d/50ilisp.el (source)...
Loading /etc/ilisp/ilisp.el (source)...
Loading /etc/ilisp/ilisp-keybindings.el (source)...done
Loading /etc/ilisp/ilisp.el (source)...done
Loading /etc/emacs/site-start.d/50ilisp.el (source)...done
Loading /etc/emacs/site-start.d/50slime.el (source)...
Loading /usr/share/emacs24/site-lisp/slime/slime-autoloads.elc...done
Loading /etc/emacs/site-start.d/50slime.el (source)...done
Loading /home/robin/.emacs.d/paredit.el (source)...done
Loading /home/robin/ilisp-master/ilisp.emacs...
Loading ilfsf23...done
Loading /home/robin/ilisp-master/ilisp.emacs...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading ilcompat...
Loading ilfsf23...done
Loading ilcompat...done
Loading comint-ipc...done
Loading extra/cltl2...done
Loading ilisp-def...done
Loading ilisp-sym...done
Loading ilisp-inp...done
Loading ilisp-ind...done
Loading ilisp-prc...done
Loading ilisp-val...done
Loading ilisp-out...done
Loading ilisp-mov...done
Loading ilisp-key...done
Loading ilisp-prn...done
Loading ilisp-low...done
Loading ilisp-doc...done
Loading ilisp-ext...done
Loading ilisp-mod...done
Loading ilisp-dia...done
Loading ilisp-cmt...done
Loading ilisp-rng...done
Loading ilisp-hnd...done
Loading ilisp-utl...done
Loading ilisp-cmp...done
Loading ilisp-kil...done
Loading ilisp-snd...done
Loading ilisp-xfr...done
Loading ilisp-hi...done
Loading ilisp-aut...done
Loading /home/robin/ilisp-master/ilisp-cl.el (source)...
File mode specification error: (invalid-function (\` (progn (defvar ((\, hook)) nil ((\, (format "*Inferior %s hook." full-name)))) (defvar ((\, program)) nil ((\, (format "*Inferior %s default program." full-name)))) (defun ((\, setup)) (buffer) ((\, (format "Set up for interacting with %s." full-name))) ((\, (read (format "(setup-%s buffer)" parent)))) ((\,@ body)) (setq ilisp-program (or ((\, program)) ilisp-program) ilisp-dialect (cons (quote ((\, dialect))) ilisp-dialect)) (run-hooks (quote ((\, (read (format "%s-hook" dialect))))))) (defun ((\, dialect)) (&optional buffer program) ((\, (format "Create an inferior %s.  With prefix, prompt for buffer and program." full-name))) (interactive (list nil nil)) (ilisp-start-dialect (or buffer ((\, dialects))) program (quote ((\, setup)))) (setq ((\, program)) ilisp-program)) (lisp-add-dialect ((\, dialects))))))
Loading vc-git...done
byte-code: Beginning of buffer [4 times]
4

1 回答 1

1

问题是 ILISP 使用过时的反引号语法。该错误似乎来自ilisp-dia.el 中 defdialect 的定义

(defmacro defdialect (dialect full-name parent &rest body)
  "Define a new ILISP dialect.
DIALECT is the name of the function to invoke the inferior LISP. The
hook for that LISP will be called DIALECT-hook.  The default program
will be DIALECT-program.  FULL-NAME is a string that describes the
inferior LISP.  PARENT is the name of the parent dialect."

  (let ((setup (read (format "setup-%s" dialect)))
        (hook (read (format "%s-hook" dialect)))
        (program (read (format "%s-program" dialect)))
        (dialects (format "%s" dialect)))
    (`
     (progn
       (defvar (, hook) nil (, (format "*Inferior %s hook." full-name)))
...

反引号和逗号的类似函数用法在 Emacs Lisp 中已弃用。来自 Emacs 24.1 的 NEWS 文件:

** 对已过时 10 年以上的“旧式”反引号的支持已进一步减少。现在,不跟空格的反引号总是被视为“新式”反引号。请从您的代码中删除所有“旧式”反引号。如果您的代码使用 Elisp 手册中记录的反引号,并且在没有警告的情况下编译,那么您在这方面无事可做。不遵循适当约定的代码可能无法编译。

最常见的问题原因似乎是旧式反引号后跟换行符。

所以这段代码应该重写为:

(defmacro defdialect (dialect full-name parent &rest body)
  (let ((setup (read (format "setup-%s" dialect)))
        (hook (read (format "%s-hook" dialect)))
        (program (read (format "%s-program" dialect)))
        (dialects (format "%s" dialect)))
    `(progn
       (defvar ,hook nil ,(format "*Inferior %s hook." full-name))
...

(虽然我怀疑让 SLIME 正常运行会更好地利用时间。)

于 2013-03-08T11:24:36.333 回答