+2007-06-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * sml-mode.el (sml-mlton-error-regexp-alist): New var.
+ (sml-mlton-typecheck): Use it.
+ (compilation-error-regexp-alist): Add entries after loading "compile"
+ so that M-x compile works.
+
+ * sml-proc.el (inferior-sml-mode): Make TAB add a " rather than a space
+ at the end of a file name.
+
2007-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
* sml-mode.el (sml-mode-variables): Set comment-quote-nested instead of
(defvar sml-mlton-mainfile nil)
+(defconst sml-mlton-error-regexp-alist
+ ;; I wish they just changed MLton to use one of the standard
+ ;; error formats.
+ `(("^\\(?:Error\\|\\(Warning\\)\\): \\(.+\\) \\([0-9]+\\)\\.\\([0-9]+\\)\\.$"
+ 2 3 4
+ ;; If subgroup 1 matched, then it's a warning, otherwise it's an error.
+ ,@(if (fboundp 'compilation-fake-loc) '((1))))))
+
+(eval-after-load "compile"
+ '(dolist ((x sml-mlton-error-regexp-alist))
+ (add-to-list 'compilation-error-regexp-alist x)))
+
(defun sml-mlton-typecheck (mainfile)
"typecheck using MLton."
(interactive
(read-file-name "Main file: "))))
(save-some-buffers)
(require 'compile)
- (add-to-list
- 'compilation-error-regexp-alist
- ;; I wish they just changed MLton to use one of the standard
- ;; error formats.
- `("^\\(?:Error\\|\\(Warning\\)\\): \\(.+\\) \\([0-9]+\\)\\.\\([0-9]+\\)\\."
- 2 3 4
- ;; If subgroup 1 matched, then it's a warning, otherwise it's an error.
- ,@(if (fboundp 'compilation-fake-loc) '((1)))))
+ (dolist ((x sml-mlton-error-regexp-alist))
+ (add-to-list 'compilation-error-regexp-alist x))
(with-current-buffer (find-file-noselect mainfile)
(compile (concat sml-mlton-command
" -stop tc " ;Stop right after type checking.