[OS X Emacs] I can't get Aquamacs to start by default with a mode

Eduardo San Miguel abx88as at gmail.com
Wed Apr 8 23:16:05 EDT 2015


Thanks!! This worked!!

Though I had to delete the grave accent in:

("\`<!DOCTYPE HTML" . web-mode)

and ended up like:

("\<!DOCTYPE HTML" . web-mode)

What a bummer it doesn't work in an easier way for such a commmon file
type. Thanks for the help! I'd had this issue for such a long time...

By the way, I don't know if this is the correct way of answering the
mailing list (reply to the post address with cc to you)

Cheers,

On Wed, Apr 8, 2015 at 3:08 PM, Marc Shapiro -- at work <
marc.shapiro at acm.org> wrote:

>
> > Date: Tue, 7 Apr 2015 14:03:46 -0600
> > From: Eduardo San Miguel <abx88as at gmail.com>
> > Subject: Re: [OS X Emacs] Delayed Mail (still being retried)
> >
> > I can't get Aquamacs to start by default with a mode I installed
> (web-mode
> > to be precise). I have asked in stackoverflow and was recommended to post
> > to this mailing list:
> >
> > [...]
> > (add-to-list 'auto-mode-alist '("\\.html$" . web-mode))
>
> This is not sufficient.  Some files types are recognised by their
> extension, in auto-mode-alist as you tried, but others are recognized by
> content, in magic-mode-alist.
>
> Here is what works for me, in my .emacs [you will need to replace
> html-helper-mode by web-mode]:
>
> (setq magic-mode-alist
>       '(("\`<!DOCTYPE HTML" . html-helper-mode)
> ("\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<\\(?:!--\\(?:[^-]\\|-[^-]\\)*-->\\s
> *<\\)*\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s
> *\\(?:!--\\(?:[^-]\\|-[^-]\\)*-->\\s *<\\)*\\)?[Hh][Tt][Mm][Ll]" .
> html-helper-mode)
>         ("<\\?xml " . xml-mode)
>         ("%![^V]" . ps-mode)
>         ("# xmcd " . conf-unix-mode)))
>
>                                                                 Marc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20150408/c5adf254/attachment.html>


More information about the MacOSX-Emacs mailing list