all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Xah Lee <xah@xahlee.org>, 4169@emacsbugs.donarmstrong.com
Subject: bug#4169: 23.1.50; default mode for xml files not correct
Date: Mon, 17 Aug 2009 22:18:12 -0400	[thread overview]
Message-ID: <jwvfxbpvper.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <e01d8a50908170735s1bdbe62dk6af9202a163e4f36@mail.gmail.com> (Lennart Borgman's message of "Mon, 17 Aug 2009 16:35:29 +0200")

>>> I wrote majmodpri.el (part of nXhtml) to take care of this kind of
>>> problem and suggested that something like it should be included in
>>> Emacs. There has not been any positive response to it yet.
>>> 
>>> The reason I wrote it was that this problem is much more prominent
>>> when there are multi major modes as an alternative too. (For an xhtml
>>> file for example you could use html-mode, nxml-mode, html-mumamo-mode,
>>> nxhtml-mumamo-mode etc.)
>> 
>> I'm not sure how emacs choose modes, or the policies, mechanisms, file
>> locations...etc, or what majmodpri.el is supposed to do. Anyway, i thought
>> this warrant a bug report for the record. Thanks.


> Major modes are choosen by searching auto-mode-alist etc. The first
> hit is choosen. (Sometimes the lists are searched several times
> though.)

> majmodpri.el sorts the list so that the major modes (or multi major
> modes) that the user prefers comes first.

When we offer several different modes for the same language
(e.g. perl-mode vs cperl-mode), we should try to make auto-mode-alist
(and other such facilities) point to a function alias (e.g. html-mode)
which can then point to whichever major mode the user favors.

E.g. we should probably rename sgml-mode.el's html-mode to
sgml-html-mode, and then make (defalias 'html-mode 'sgml-html-mode) so
that the user can easily (fset 'html-mode 'my-html-mode).


        Stefan





  reply	other threads:[~2009-08-18  2:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-12  0:12 Default for editing XML files Chong Yidong
2009-09-12  1:41 ` bug#4169: " Miles Bader
2009-09-12  1:41 ` Miles Bader
2009-09-12  6:29 ` joakim
2009-09-12  6:29 ` bug#4169: " joakim
2009-09-12 16:02 ` Eric Hanchrow
2009-09-12 22:19   ` Sean Sieger
2009-09-13  1:16     ` Stefan Monnier
2009-09-13  1:30     ` Jason Rumney
2009-09-18 18:49 ` Chong Yidong
2009-08-17  2:33   ` bug#4169: 23.1.50; default mode for xml files not correct Xah Lee
2009-08-17 14:35     ` Lennart Borgman
2009-08-18  2:18       ` Stefan Monnier [this message]
2009-08-18  2:25         ` Lennart Borgman
2009-09-18 18:55     ` bug#4169: marked as done (23.1.50; default mode for xml files not correct) Emacs bug Tracking System
2009-09-21 21:48   ` Default for editing XML files Juri Linkov
2009-09-21 22:12     ` Chong Yidong
2009-09-22 14:27       ` Stefan Monnier
2009-09-23  9:06         ` Juri Linkov
2009-09-23 15:57           ` Chong Yidong
2009-09-23 20:43           ` Stefan Monnier
2009-09-24 20:57             ` Juri Linkov
2009-09-24 21:14               ` Lennart Borgman
2009-09-25  2:03               ` Chong Yidong
2009-09-25  9:01                 ` Juri Linkov
2009-09-25 14:18                   ` 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=jwvfxbpvper.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=4169@emacsbugs.donarmstrong.com \
    --cc=lennart.borgman@gmail.com \
    --cc=xah@xahlee.org \
    /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.