我已经在 Emacs(版本 26.2)中安装了包sml-mode(版本 6.9),但是当我尝试打开一个 .sml 文件时,我在 minibuffer 中收到以下错误:File mode specification error: (invalid-read-syntax ?)
. 因此,编辑器无法识别 SML 语法,这一点也很明显,因为当前模式显示的Fundamental
模式不是SML
.
这些是我设置环境的步骤:
- 我首先在
usr/local/sml
. - 我尝试安装预设
sml-mode
包(Mx list-packages)。然而这并没有成功。 sml-mode-6.9.el
然后,我在我的机器上从https://elpa.gnu.org/packages/sml-mode.html下载了内容,并将其安装在 Emacs 上(Mx package-install-file)。- Emacs 中的包列表在包旁边显示Installed
sml-mode
,但显然不起作用。
使用 Mx toggle-debug-on-error 提供以下堆栈跟踪:
Debugger entered--Lisp error: (invalid-read-syntax "?")
read(#<buffer *load*>)
eval-buffer(#<buffer *load*> nil "/home/Roberto/.emacs.d/elpa/sml-mode-6.9/sml-mode.el" nil t) ; Reading at buffer position 9890
load-with-code-conversion("/home/Roberto/.emacs.d/elpa/sml-mode-6.9/sml-mode.el" "/home/Roberto/.emacs.d/elpa/sml-mode-6.9/sml-mode.el" nil t)
sml-mode()
set-auto-mode-0(sml-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(t t)
find-file-noselect-1(#<buffer test.sml> "~/test.sml" nil nil "~/test.sml" nil)
find-file-noselect("~/test.sml" nil nil t)
find-file("~/test.sml" t)
funcall-interactively(find-file "~/test.sml" t)
call-interactively(find-file nil nil)
command-execute(find-file)