diff options
author | 2012-05-05 19:57:54 -0400 | |
---|---|---|
committer | 2012-05-05 19:57:54 -0400 | |
commit | 8fc21f019ff8eedfb1396e38b2352454c47598d2 (patch) | |
tree | e97f6e6729e062b30cc26bb5f77e4933224c2063 | |
parent | dbc4afdb439a09c04b54ea6c2179f3cc50d11602 (diff) |
Adjust error message format to match Emacs defaults
-rw-r--r-- | src/elisp/urweb-mode.el | 5 | ||||
-rw-r--r-- | src/errormsg.sml | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/elisp/urweb-mode.el b/src/elisp/urweb-mode.el index 480ba1f6..f183a9ab 100644 --- a/src/elisp/urweb-mode.el +++ b/src/elisp/urweb-mode.el @@ -67,6 +67,7 @@ ;;; Code: (eval-when-compile (require 'cl)) +(require 'compile) (require 'urweb-util) (require 'urweb-move) (require 'urweb-defs) @@ -394,6 +395,8 @@ This mode runs `urweb-mode-hook' just before exiting. ;; Compatibility. FIXME: we should use `-' in Emacs-CVS. (unless (boundp 'skeleton-positions) (set (make-local-variable '@) nil)) + (local-set-key (kbd "C-c C-c") 'compile) + (urweb-mode-variables)) (defun urweb-mode-variables () @@ -903,8 +906,6 @@ Optional argument STYLE is currently ignored." (urweb-skip-siblings)) fullname))) - - (provide 'urweb-mode) ;;; urweb-mode.el ends here diff --git a/src/errormsg.sml b/src/errormsg.sml index f402c5aa..f9ed71e8 100644 --- a/src/errormsg.sml +++ b/src/errormsg.sml @@ -1,4 +1,4 @@ -(* Copyright (c) 2008, Adam Chlipala +(* Copyright (c) 2008, 2012, Adam Chlipala * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,8 +94,13 @@ fun anyErrors () = !errors fun error s = (TextIO.output (TextIO.stdErr, s); TextIO.output1 (TextIO.stdErr, #"\n"); errors := true) -fun errorAt span s = (TextIO.output (TextIO.stdErr, spanToString span); - TextIO.output (TextIO.stdErr, ": "); + +fun errorAt span s = (TextIO.output (TextIO.stdErr, #file span); + TextIO.output (TextIO.stdErr, ":"); + TextIO.output (TextIO.stdErr, posToString (#first span)); + TextIO.output (TextIO.stdErr, ": (to "); + TextIO.output (TextIO.stdErr, posToString (#last span)); + TextIO.output (TextIO.stdErr, ") "); error s) fun errorAt' span s = errorAt (spanOf span) s |