[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
magic-mode-alist has too high a priority
From: |
Dominique de Waleffe |
Subject: |
magic-mode-alist has too high a priority |
Date: |
Wed, 23 Feb 2005 21:40:22 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
I need to view/edit ontologies in OWL syntax (XML files).
I use an owl-mode which puts ("\\.owl$" . owl-mode) in front of
auto-mode-alist.
However when I view those ontologies, the magic-mode-alist specified
function (xml-mode) is called because of the <?xml token on the first
line. So I find my file visited in xml-mode instead of the owl-mode.
[I cannot put a -*- owl-*- line either as the files are normally written
by another tool...]
To me this is wrong. The mode in auto-mode-alist should be favored
when present because:
- configuring both magic-mode-alist and auto-mode-alist is a lot more
complex, and it breaks a behaviour that was in Emacs for quite a long
time.
- magic-mode-alist is not customisable
=> the mode specified by magic-mode-alist should be used if the other
options (all of which are more visible and known) have not provided a
mode.
Took me a while to see the magic :-)
Best regards to all,
D.
In GNU Emacs 21.3.50.1 (i386-mingw-nt5.0.2195)
of 2005-01-30 on NONIQPC
Distributor `Microsoft Corp.', version 5.0.2195
configured using `configure --with-gcc (3.3) --cflags
-I../../jpeg-6b-3/include -I../../libpng-1.2.8/include
-I../../tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include
-I../../zlib-1.2.2/include'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: FRB
locale-coding-system: cp1252
default-enable-multibyte-characters: nil
Major mode: IELM
Minor modes in effect:
auto-compression-mode: t
show-paren-mode: t
msb-mode: t
display-time-mode: t
tool-bar-mode: t
encoded-kbd-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> c SPC SPC SPC SPC SPC c SPC
SPC SPC SPC SPC SPC q y <help-echo> <help-echo> <help-echo>
<help-echo> C-h v m a g i c - m o d e - l i s t <return>
<C-backspace> <C-backspace> <C-backspace> C-g q <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <menu-bar> <help-menu> <about> <help-echo>
<help-echo> <down-mouse-1> <mouse-1> M-x i e l m <return>
C-h v m a g i <tab> <return> M-x r e p o r t - e m
a <tab> <return>
Recent messages:
Are you sure you want to quit reading news? (y or n)
Wrote c:/users/ddw/.newsrc
Saving c:/users/ddw/.newsrc.eld...
Wrote c:/users/ddw/.newsrc.eld
Saving c:/users/ddw/.newsrc.eld...done
Entering debugger...
Back to top level.
Loading ielm...done
Type C-x 1 to remove help window. C-M-v to scroll the help.
Loading emacsbug...done
--
Dominique de Waleffe
smime.p7s
Description: S/MIME Cryptographic Signature
- magic-mode-alist has too high a priority,
Dominique de Waleffe <=