# HG changeset patch # User Adam Chlipala # Date 1336262274 14400 # Node ID 9b54fbe1efdb7b7cd7203be3c84cb49fb38d637f # Parent 1dd8a8791d9c697d89765192a58a7f13b01ffbde Adjust error message format to match Emacs defaults diff -r 1dd8a8791d9c -r 9b54fbe1efdb src/elisp/urweb-mode.el --- a/src/elisp/urweb-mode.el Sat May 05 13:08:26 2012 -0400 +++ b/src/elisp/urweb-mode.el Sat May 05 19:57:54 2012 -0400 @@ -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 @@ ;; 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 @@ (urweb-skip-siblings)) fullname))) - - (provide 'urweb-mode) ;;; urweb-mode.el ends here diff -r 1dd8a8791d9c -r 9b54fbe1efdb src/errormsg.sml --- a/src/errormsg.sml Sat May 05 13:08:26 2012 -0400 +++ b/src/errormsg.sml Sat May 05 19:57:54 2012 -0400 @@ -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 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