The following is a version of the sml mode for xemacs that has been tweaked. In particular, it provides a modified syntax highlighting, and some fixes to the sml buffer mode. It also opens *.ML files in SML mode (handy for PolyML/Isabelle programming).
;; to disable the old sml-mode in xemacs
(setq load-path (remove "/usr/share/xemacs/xemacs-packages/lisp/sml-mode/" load-path))
;; load the new version of the sml mode
(add-to-list 'load-path "PATH_TO_NEW_SML_MODE/sml-mode")
;; set some default params - ie to start isabelle as the ml shell.
(setq sml-program-name "isabelle")
(setq sml-default-arg "HOL")