Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml-mode/trunk/sml-mode.el
ViewVC logotype

Diff of /sml-mode/trunk/sml-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2724, Fri Jun 29 04:48:41 2007 UTC revision 2725, Fri Jun 29 05:13:04 2007 UTC
# Line 992  Line 992 
992    
993  (defvar sml-mlton-mainfile nil)  (defvar sml-mlton-mainfile nil)
994    
995    (defconst sml-mlton-error-regexp-alist
996      ;; I wish they just changed MLton to use one of the standard
997      ;; error formats.
998      `(("^\\(?:Error\\|\\(Warning\\)\\): \\(.+\\) \\([0-9]+\\)\\.\\([0-9]+\\)\\.$"
999         2 3 4
1000         ;; If subgroup 1 matched, then it's a warning, otherwise it's an error.
1001         ,@(if (fboundp 'compilation-fake-loc) '((1))))))
1002    
1003    (eval-after-load "compile"
1004      '(dolist ((x sml-mlton-error-regexp-alist))
1005         (add-to-list 'compilation-error-regexp-alist x)))
1006    
1007  (defun sml-mlton-typecheck (mainfile)  (defun sml-mlton-typecheck (mainfile)
1008    "typecheck using MLton."    "typecheck using MLton."
1009    (interactive    (interactive
# Line 1000  Line 1012 
1012             (read-file-name "Main file: "))))             (read-file-name "Main file: "))))
1013    (save-some-buffers)    (save-some-buffers)
1014    (require 'compile)    (require 'compile)
1015    (add-to-list    (dolist ((x sml-mlton-error-regexp-alist))
1016     'compilation-error-regexp-alist      (add-to-list 'compilation-error-regexp-alist x))
    ;; 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)))))  
1017    (with-current-buffer (find-file-noselect mainfile)    (with-current-buffer (find-file-noselect mainfile)
1018      (compile (concat sml-mlton-command      (compile (concat sml-mlton-command
1019                       " -stop tc "       ;Stop right after type checking.                       " -stop tc "       ;Stop right after type checking.

Legend:
Removed from v.2724  
changed lines
  Added in v.2725

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0