Using cc65 with Emacs

When developing with Emacs, it is often convenient to use the M-x compile command to invoke make from within Emacs. One benefit of invoking the compiler this way is that Emacs is able to parse the list of errors output by the compiler, and provide you with the ability to jump to the location of the errors in the source code.

In order for this to work with cc65 and ca65, Emacs needs to be taught how to parse the error messages. To do so, add the following snippet to your .emacs file:

(require 'compile)
; ** cc65 and ca65 errors **
(pushnew '("^\\([^ \n(]+\\)(\\([0-9]+\\)): \\(?:Error\\|Warnin\\(g\\)\\):" 1 2 nil (3))

With this in place, you will be able to use the M-g M-n (next-error) and M-g M-p (previous-error) keys to visit the source code for each error.

cc65/using_cc65_with_emacs.txt · Last modified: 2010-04-22 21:17 by uz
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki