From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?TWFya3VzIE5pw59s?= Newsgroups: gmane.emacs.help Subject: Re: Difference in major mode autoload between 21.3.x and 22.0.x? Date: Fri, 14 Oct 2005 15:02:34 +0200 Organization: Arcor Message-ID: <434fac6a$0$24158$9b4e6d93@newsread4.arcor-online.net> References: <434f677a$0$10226$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1129296762 4867 80.91.229.2 (14 Oct 2005 13:32:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2005 13:32:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 14 15:32:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EQPeG-0008W0-HX for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Oct 2005 15:31:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQPeF-0006hu-BA for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Oct 2005 09:30:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!news.n-ix.net!noris.net!newsfeed.arcor.de!news.arcor.de!not-for-mail User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 45 Original-NNTP-Posting-Date: 14 Oct 2005 15:02:34 MEST Original-NNTP-Posting-Host: a0c97777.newsread4.arcor-online.net Original-X-Trace: DXC=UKfA; R[le:T40bn3J7ld6Q:ejgIfPPldTjW\KbG]kaMXea\9g\; 7NmU3; `GK`g; XKQUjeHfPM>eNT_?d?5Djc5EQoWJNF19F]_] Original-X-Complaints-To: abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.help:134652 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30233 Archived-At: Slawomir Nowaczyk wrote: > A question to the rest of the list: I have seen this being > asked a couple of time recently... maybe it would make sense to > change default value of magic-mode-alist to not include > "xml-mode" and "html-mode" ? Yeap, could make sense ... the problem is that an xsl file starts the very same way an xml file does ... > #> By far, I'm no Emacs expert ... so, can you give me a hint > #> in which way I have to modify magic-mode-alist so that > #> xsl-mode is being started whenever a file with the extension > #> ".xsl" is loaded? > > Well, try this (not tested): > > (push magic-mode-alist '("<\\?xml " . nil)) Looks fine to me, but nope, this line results into the following error: Wrong type argument: symbolp, (quote (<\?xml )) But I simply altered the line a bit using "setq" instead of "push": (autoload 'xsl-mode "xslide" "Major mode for XSL stylesheets." t) (setq auto-mode-alist (cons '("\\.xsl$" . xsl-mode) auto-mode-alist)) (setq magic-mode-alist (cons '("<\\?xml " . nil) magic-mode-alist)) > I am sure those better versed in elisp can suggest a nicer solution :) Well, I'm fine with the solution above. Elisp is pretty weird to code if you come from C++ or Java ... > #> In 21.x, it was a breeze for an elisp novice to copy those two > #> lines and to adjust them to my needs. > > I agree, auto-mode-alist is much easier to customise. Yeap, although magic-mode-alist is certainly a nice "intelli-sense" feature ;-) Thanks a bunch for your help, Markus