* Allow next-error to work with csc.exe
@ 2008-05-27 21:52 D Chiesa
0 siblings, 0 replies; only message in thread
From: D Chiesa @ 2008-05-27 21:52 UTC (permalink / raw)
To: emacs-devel
Hey, I posted this independently, and someone suggested I should send it to
this mailing list.
I don't read the list, so I'm not sure if this is useful or on-topic or
what. My apologies in advance if this is noise.
Here is a fragment of elisp to allow next-error to grok errors generated by
the Microsoft C# compiler (csc.exe).
I'm sure this isn't the best format for general use, and someone will
probably want to format it properly, and use the append and so on. But the
regex's are there for the taking.
I also added regex's for vjc.exe, which is the Visual J++ compiler, and the
C/C++ compiler from Microsoft. These are all command-line compilers
available in the Windows Platform SDK (a free download) and the .NET
Framework SDK (also a free download).
send me mail if questions or problems.
-Dino
ps: my original post is here:
http://blogs.msdn.com/dotnetinterop/archive/2008/05/22/emacs-regex-to-grok-csc-compilation-errors.aspx
;; to allow next-error to work with csc.exe:
(setq compilation-scroll-output t)
(setq-default compilation-error-regexp-alist
; (append
'(
; Microsoft VJC:
;sample.java(6,1) : error J0020: Expected 'class' or 'interface'
("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)[,]\\([0-9]+\\)):
\\(error\\|warning\\) VJS[0-9]+:" 1 3 4)
;; Wed, 04 Aug 2004 09:29
;; also handle whitespace at beginning of line (for nant output)
;;
;C# Compiler
;t.cs(6,18): error SC1006: Name of constructor must match name of class
;
("[ \t]*\\(\\([_a-zA-Z:\]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)[,]\\([0-9]+\\)):
\\(error\\|warning\\) CS[0-9]+:" 1 3 4)
; Microsoft C/C++:
; keyboard.c(537) : warning C4005: 'min' : macro redefinition
; d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if'
;VC EEi
;e:\projects\myce40\tok.h(85) : error C2236: unexpected 'class' '$S1'
;myc.cpp(14) : error C3149: 'class System::String' : illegal use of managed
type 'String'; did you forget a '*'?
("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \
: \\(error\\|warning\\) C[0-9]+:" 1 3)
)
;; compilation-error-regexp-alist)
)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-27 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27 21:52 Allow next-error to work with csc.exe D Chiesa
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).