Commits

seanmcl committed f707f45

handle loading error

  • Participants
  • Parent commits dea2813

Comments (0)

Files changed (1)

elisp/jane/jane-ocaml.el

     (t (error "Bad key for ocaml-indenter.  Should be 'tuareg or 'ocp-indent"))))
 
 ;; ocp-indent-line and ocp-indent-region
-(load (expand-file-name "../../ocaml/contrib/ocp-indent/emacs.el"
-                        (file-name-directory (or load-file-name "."))))
-(remove-hook 'tuareg-mode-hook 'ocp-setup-indent)
+(condition-case nil
+    (load (expand-file-name "../../ocaml/contrib/ocp-indent/emacs.el"
+                            (file-name-directory (or load-file-name "."))))
+  (remove-hook 'tuareg-mode-hook 'ocp-setup-indent)
+  (error (message "Compile js-elisp")))
 
 (defun jane-tuareg-mode-hook ()
   (auto-fill-mode 1)