From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Default for editing XML files Date: Thu, 24 Sep 2009 23:57:28 +0300 Organization: JURTA Message-ID: <87k4zotit8.fsf@mail.jurta.org> References: <87ws45qavl.fsf@stupidchicken.com> <87eiq4jdgh.fsf@stupidchicken.com> <8763bc2fei.fsf@mail.jurta.org> <87d45kt0a4.fsf@stupidchicken.com> <87ab0mr5vq.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253826384 24427 80.91.229.12 (24 Sep 2009 21:06:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 21:06:24 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 24 23:06:16 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqvVw-0001qZ-Ng for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2009 23:06:09 +0200 Original-Received: from localhost ([127.0.0.1]:53022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqvVw-0006Wt-39 for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2009 17:06:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqvUt-0006Kx-1i for emacs-devel@gnu.org; Thu, 24 Sep 2009 17:05:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqvUo-0006Is-HU for emacs-devel@gnu.org; Thu, 24 Sep 2009 17:05:02 -0400 Original-Received: from [199.232.76.173] (port=55828 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqvUo-0006Ij-49 for emacs-devel@gnu.org; Thu, 24 Sep 2009 17:04:58 -0400 Original-Received: from smtp-out2.starman.ee ([85.253.0.4]:41036 helo=mx2.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqvUn-0003iq-Ii for emacs-devel@gnu.org; Thu, 24 Sep 2009 17:04:57 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.70.149.cable.starman.ee [82.131.70.149]) by mx2.starman.ee (Postfix) with ESMTP id 264F43F40B9; Fri, 25 Sep 2009 00:04:48 +0300 (EEST) In-Reply-To: (Stefan Monnier's message of "Wed, 23 Sep 2009 16:43:22 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115592 Archived-At: >> I agree, it would be better to configure sgml-mode/nxml-mode >> for all calls of xml-mode in one place. Maybe with the help >> of a new defcustom like: > >> (defcustom xml-mode 'nxml-mode >> "Define xml-mode." >> :type '(choice (const nxml-mode) >> (const sgml-mode))) > >> (defun xml-mode () >> (interactive) >> (funcall xml-mode)) > > We already had xml-mode as an alias for sgml-mode, AFAICT. > I see no need to introduce such additional customization: we should just > change the alias to point to nxml-mode. The question is how often users might want to switch xml-mode back to sgml-mode and how easy this should be. Putting a line (defalias 'xml-mode 'sgml-mode) to .emacs is easy but only if this line is easy to find in documentation. One easy way is the Customization UI, another is adding menu entries to the mode menu. Designing a general mechanism to select a mode amongst multiple implementations would be even better e.g. to switch `perl-mode' between `perl-mode' and `cperl-mode', `js-mode' between `js2-mode' and `espresso-mode', etc. -- Juri Linkov http://www.jurta.org/emacs/