3

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.

krismath
  • 133
  • 1
  • 6

1 Answers1

7

This is a problem of conflicting libraries in load-path. I think you should inspect your load-path to see if you have sml-mode directory in it twice. The first directory probably doesn't contain a definition for sml-mode and hence Emacs fails to load it from there.

You can do M-x list-load-path-shadows to see if some sml-mode like file is shadowing the original file with the right definitions.

narendraj9
  • 304
  • 2
  • 7