Re: PSGML conflicts with sgml-mode (CVS Emacs)
Lennart Staflin <[email protected]> Thu, 7 Apr 2005 12:41:22 +0200
| Newsgroups | gmane.emacs.psgml.user |
|---|---|
| Message-ID | <[email protected]> |
On 7 apr 2005, at 02:44, D. D. Brierton wrote: >> From the PROBLEMS file in CVS Emacs: > > *** PSGML conflicts with sgml-mode. > > PSGML package uses the same names of some variables (like > keymap) as built-in sgml-mode.el because it was created as a > replacement of that package. The conflict will be shown if you > load sgml-mode.el before psgml.el. E.g. this could happen if > you edit HTML page and then start to work with SGML or XML > file. > html-mode (from sgml-mode.el) is used for HTML file and loading > of psgml.el (for sgml-mode or xml-mode) will cause an error. > > At the moment I am working around this problem by manually removing > sgml-mode.el and sgml-mode.elc > from /usr/share/emacs/21.3.50/lisp/textmodes/, but clearly that is not > an elegant solution. Can someone explain an elegant way to work around > the above problem? If you are using psgml for sgml and xml (with autoloads), it would seem that html-mode is the major problem. One solution (workaround really) is to replace html-mode with sgml-mode in auto-mode-alist. Another solution is to make a simple html-mode that uses sgml-mode. I use something like: (defun html-mode () (interactive) (sgml-mode) (make-local-variable 'sgml-default-doctype-name) (setq sgml-default-doctype-name "HTML" sgml-always-quote-attributes t sgml-indent-step 2 sgml-indent-data t sgml-minimize-attributes nil sgml-omittag t sgml-shortag t )) //Lennart Staflin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click