;; Copyright (C) 1995-1999 Jean Goubault-Larrecq and Bull S.A. ;; Copyright (C) 2000-2004 Jean Goubault-Larrecq ;; and LSV, CNRS UMR 8643 & INRIA Futurs projet Secsi & ENS Cachan. (require 'himml-mode) (require 'compile) (if (boundp 'compilation-error-regexp-alist) ;in Emacs19 (let ((error-regexps '(("\n\\(Error\\|Warning\\): +\\([^ \n,]*\\), +lines? +\\([0-9]+\\)(\\([0-9]+\\))[^:\n]*:" 2 3 4) ("\n\\(Error\\|Warning\\): +\\([^ \n,]*\\), +lines? +\\([0-9]+\\)[^0-9(][^:\n]*:" 2 3)))) (if (member (car (car error-regexps)) compilation-error-regexp-alist) () (setq compilation-error-regexp-alist (append error-regexps compilation-error-regexp-alist)))) (let ((error-regexp "\\|\\([^:]+: +[^ \n,]*, +lines? +[0-9]+\\)")) (if (boundp 'himml-error-compile-p) () (setq-default compilation-error-regexp (concat compilation-error-regexp error-regexp)) (setq himml-error-compile-p t) ))) (let ((ext (if himml-emacs19-p "\\.ml\\'" "\\.ml$"))) (let ((entry (assoc ext auto-mode-alist))) (if (and entry (eq (cdr entry) 'himml-mode)) () (setq auto-mode-alist (cons (cons ext 'himml-mode) auto-mode-alist))))) (if himml-emacs19-p (progn (define-key global-map "\C-x\C-h\C-n" 'himml-next-error) (define-key global-map "\C-x\C-h\C-p" 'himml-prev-error) (define-key global-map "\C-x\C-h\C-s" 'himml-shell) (define-key global-map "\C-x\C-h\C-e" 'himml-eval) ) (global-set-key "\C-c\C-n" 'himml-next-error) (global-set-key "\C-c\C-p" 'himml-prev-error) (global-set-key "\C-c\C-s" 'himml-shell) (global-set-key "\C-c\C-e" 'himml-eval))