all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: slashdevslashnull@gmx.net
Subject: Re: Suggestions? Better filetype sniffing -- XHTML vs. HTML
Date: Fri, 27 May 2005 16:29:04 +0200	[thread overview]
Message-ID: <87fyw891zj.fsf@matthi.local> (raw)
In-Reply-To: pan.2004.02.24.17.46.20.783470@dzr-web.com

"D. D. Brierton" <darren@dzr-web.com> 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            darren@dzr-web.com           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.

  reply	other threads:[~2005-05-27 14:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-24 14:56 Suggestions? Better filetype sniffing -- XHTML vs. HTML D. D. Brierton
2004-02-24 16:47 ` Kin Cho
2004-02-24 17:16   ` D. D. Brierton
2004-02-24 17:31     ` Kin Cho
2004-02-24 17:46       ` D. D. Brierton
2005-05-27 14:29         ` slashdevslashnull [this message]
     [not found]         ` <mailman.2088.1117208718.25862.help-gnu-emacs@gnu.org>
2005-05-27 23:39           ` Thien-Thi Nguyen
2005-05-31  6:52             ` don provan
2005-09-12  7:59               ` Thien-Thi Nguyen
2005-09-15 16:25                 ` don provan
2004-02-24 17:11 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fyw891zj.fsf@matthi.local \
    --to=slashdevslashnull@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.