From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arturius mac Aidan Newsgroups: gmane.emacs.help Subject: Re: nxml-mode autoload? Date: Mon, 31 Oct 2005 00:48:37 -0500 Organization: Invisible Light Message-ID: References: <44ednc8paYY1r_neRVn-hQ@speakeasy.net> <87oe57fcd2.fsf@borlap.bornier.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1130738137 24213 80.91.229.2 (31 Oct 2005 05:55:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2005 05:55:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 31 06:54:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EWSYr-0001ob-UO for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Oct 2005 06:50:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EWSYr-0002lN-CM for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Oct 2005 00:50:25 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Sun, 30 Oct 2005 23:48:37 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.9.2 Original-Lines: 76 Original-NNTP-Posting-Host: 66.92.149.152 Original-X-Trace: sv3-X02O25Tp++bnQ1u5TXlJ+8mIV0tRNfWMissOyLFZGJ4WVVSXvQp/fgJhU0XgpOPNhSaCmWVJQOjiIUF!sjwiNbAyXJ3fCJZCiq+fdAaTcDsO33GVhfS/uRhkTZ+PzyztLFFx8t11E664/MydDygrf1oWIj9K!Mb1G+naCaZui7lt3dXA= Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Original-Xref: shelby.stanford.edu gnu.emacs.help:135115 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:30706 Archived-At: Jean Magnan de Bornier wrote: > Arturius mac Aidan wrote : > >> These entries are in my .emacs >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> ;; autoinsert.el >> ;;http://www.linuxgazette.com/issue39/marsden.html >> >> (setq auto-mode-alist >> (append '(("\\.h$" . c++-mode) >> ("\\.cpp\\'" . c++-mode) >> ("\\.moc\\'" . c++-mode)) >> auto-mode-alist)) >> >> (add-hook 'find-file-hooks 'auto-insert) >> (setq-default auto-insert-query nil) >> >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> ;; www.thaiopensource.com/nxml-mode >> ;; per the ~/.emacs.d/lisp/nxml-mode-20041004/README >> (load "~/.emacs.d/lisp/nxml-mode-20041004/rng-auto.el") >> (setq auto-mode-alist >> (append '(("\\.xml\\'" . nxml-mode) >> ("\\.xsl\\'" . nxml-mode) >> ("\\.rng\\'" . nxml-mode) >> ("\\.xhtml\\'" . nxml-mode)) >> auto-mode-alist)) >> ;;;;;;;;;;;;;;;;;EOF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> >> >> The first auto-mode-alist entries (for c++) work as expected. the ones >> for >> nxml-mode do not work. I can, however, start the mode with `M-x >> nxml-mode'. Does anybody know why this is not working? >> > On emacs-wiki you can find this solution: > > (fset 'xml-mode 'nxml-mode) > > There was a recent discussion on the french emacs group, somebody argued > this solution was lame, If it works, it works. At least for now. > and proposed the following: > > (defcustom drkm-misc:magic-modes-to-delete > '(html-mode sgml-mode xml-mode) > "List of mode symbols whose entries to delete in > `magic-mode-alist'." > :type '(repeat symbol) > :group 'drkm) > > (when (boundp 'magic-mode-alist) > (setq magic-mode-alist > (delete-if (lambda (cell) > (memq (cdr cell) > drkm-misc:magic-modes-to-delete)) > magic-mode-alist))) > > (push '("\\`<\\?xml" . nxml-mode) magic-mode-alist) > > This works well, provided you load cl (before these commands) if it is not > already loaded: > > (require 'cl) > > I cannot explain these lines but they have to do with the > "magic-mode-alist" interfering in some way with "auto-mode-alist". > > hth, To whom shall I report the bug, James Clark, or the Emacs developers? -- .