I have just install a version of emacs (GNU Emacs 24.5.1 i686-pc-mingw32) on a Windows 8 Machine. On trying to open an example SML file (Standard ML Language). An error occurred:
File mode specification error: (error "Autoloading failed to define function sml-mode")
On deeper inspection the debugger shows this:
Debugger entered--Lisp error: (error "Autoloading failed to define function sml-mode")
sml-mode()
set-auto-mode-0(sml-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(# "g:/example00.sml" nil nil "g:/example00.sml" ((512 4 . 8192) (48259 . 42323)))
find-file-noselect("g:/example00.sml" nil nil nil)
find-file("g:/example00.sml")
find-file-existing("g:/example00.sml")
menu-find-file-existing()
call-interactively(menu-find-file-existing nil nil)
command-execute(menu-find-file-existing)
How can I resolve this error?
Edit : I installed sml-mode via list-packages
.
sml-mode
in yourload-path
? If not, that's your problem. – Drew Feb 20 '17 at 18:02(add-to-list 'load-path "/path/to/your/directory/")
and then you use(require 'the-library)
. – Drew Feb 20 '17 at 18:12(package-initialize)
. In that case, you should not need to fiddle withload-path
andrequire
. – Drew Feb 20 '17 at 18:13