As far as I can tell, the only thing relevant to XS there is
(add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
which is to say they set files ending in ".xs" to C mode. But XS files aren't C code. A snippet for example:
# ----------------------------------------- MODULE = Mozilla::DOM PACKAGE = Mozilla::DOM::NSEvent PREFIX = m +oz_dom_ PRBool moz_dom_DispatchEvent (target, event) nsIDOMEventTarget *target; nsIDOMEvent *event; PREINIT: PRBool rv; CODE: target->DispatchEvent(event, &rv); RETVAL = rv; OUTPUT: RETVAL
Though at a glance it looks like the syntax highlighting is okay in C mode. It would be neat if there was an XS mode, similar to mmm-mode in that it could use different modes in different regions of the page (e.g. in mmm-mode, the HTML is done differently than the %perl sections; the XS mode could distinguish the C code at the top from the XS code at the bottom).
In reply to Re^2: XS mode for (x)emacs?
by ForgotPasswordAgain
in thread XS mode for (x)emacs?
by Joost
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |