[OS X Emacs] Changing default auto-mode-alist for .m

David Reitter david.reitter at gmail.com
Tue Jan 13 15:29:16 EST 2009


On 13 Jan 2009, at 15:11, John Velman wrote:

> The built in automatic mode for .m files is Matlab.  I need these to
> come up as objective-c.
>
> After some searching, I guess I don't know emacs well enough to put in
> the right search words, or don't understand the answers I've found.

The right way to distinguish MATLAB from ObjC files would be via  
`magic-mode-alist'.  That said, I don't see how to reliably identify  
either file type.  I guess, ObjC files commonly have some comments /*  
*/ or #include statements.

Of course one can hardcode *.m = ObjC, but I'd be interested in  
distinguishing contents so that Matlab files are actually loaded with  
Matlab.

--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and  
support the Aquamacs Project!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2193 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20090113/2747c4c2/attachment.p7s>


More information about the MacOSX-Emacs mailing list