[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default for editing XML files

From: Juri Linkov
Subject: Re: Default for editing XML files
Date: Thu, 24 Sep 2009 23:57:28 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]