好的我知道ILISP不再开发,但SLIME没有ILISP的一些功能,即自动完成,突出显示用户定义的函数,用户函数的参数列表提示等等。
我在this place找到了一个更新的ILISP包存储库。我在Linux上使用SBCL。
我必须编辑ilcompat.el
并添加
((string-match "^24" emacs-version)
'fsf-23)
使用Emacs 24.x编译它。它确实使用大量警告进行编译。
然后根据INSTALLATION
doc,我将(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]
答案 0 :(得分:1)
问题是ILISP使用过时的反引用语法。该错误似乎来自the definition of defdialect in ilisp-dia.el:
(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可以更好地利用时间。)