Path: utzoo!utgpu!cunews!cognos!jimp From: jimp@cognos.UUCP (Jim Patterson) Newsgroups: comp.sys.hp Subject: Re: CC, emacs, and the three bears Message-ID: <9721@cognos.UUCP> Date: 10 Jun 91 13:55:38 GMT References: <2308@godzilla.tcs.com> Reply-To: jimp@cognos.UUCP (Jim Patterson) Organization: Cognos Inc., Ottawa, Canada Lines: 38 In article <2308@godzilla.tcs.com> colin@tcs.com (Colin Kendall) writes: >I am using /usr/bin/CC on an HP9000S300. I believe that >is the HP-UX C++ translator. >I am also using GNU Emacs version 18.55.something. >However, emacs can only recognize errors when they are in a >certain format. Consider the following partial output from >a make: >getmaps.c: 18: warning- extra characters on #endif. >cfbasics.h: 37: warning- Redefinition of macro ANSI. >getmaps.c: 610: warning- extra characters on #endif. >CC: "../getmaps.c", line 116: warning 117: id not used >Emacs recognized the first three warnings (from cpp), but not the >fourth (from cfront). >I want it to recognize all the errors and warnings. Emacs allows the definition of an error message to be specified by means of a variable called compilation-error-regexp . It's defined in the file lisp/compile.el (which is under /usr/local/emacs in a "standard" installation of emacs). You can set it in your .emacs file or in the default.el file for your site via setq, e.g. (setq compilation-error-regexp "\\([^ :\n]+\\(: *\\|, line \\|(\\)[0-9]+\\)\\|\\([0-9]+ *of *[^ \n]+\\)") (This version is the one from compile.el that you need to change). If things are really messed up, you may need to modify compile.el as well. -- Jim Patterson Cognos Incorporated UUNET:uunet!cognos.uucp!jimp P.O. BOX 9707 BITNET:ccs.carleton.ca!cognos.uucp!jimp 3755 Riverside Drive PHONE:(613)738-1440 x6112 Ottawa, Ont K1G 3Z4