"D. D. Brierton" <[EMAIL PROTECTED]> writes:

> On Tue, 24 Feb 2004 09:31:51 -0800, Kin Cho wrote:
>
>> Change 'xml-html-mode to (xml-html-mode).
>> 
>> If you know C, 'xml-html-mode is like taking the address of a
>> function.
>
> That did the trick. Thanks a lot!
>
> Best, Darren
>
> -- 
> ======================================================================
> D. D. Brierton            [EMAIL PROTECTED]           www.dzr-web.com
>        Trying is the first step towards failure (Homer Simpson)
> ======================================================================

It still doesnt work for me. The hook prevents MMM-Mode from being
activated for html - files (non xhtml) for me. This may be due to
splitting your Emacs WebDev (thank you for that) across multiple files
or the MMM-Mode version i am using (0.4.8) or something else.

I guess its because MMM-Mode reruns the sgml-html-mode hooks while activating
which somehow fails for html files when point is not at the beginning of
the buffer which seems to be the case.

(defun guess-xhtml-hook ()
  "Guess whether the current buffer is XHTML."
  (when
      (save-excursion
        (goto-char 1)
        (search-forward-regexp "<[?]xml\\|//W3C//DTD XHTML" 80 t))
    (xml-html-mode)))

works for me.



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to