I've used psgml
for some while now, when creating website pages using XML and psgml-mode
together.
However, when I upgraded emacs to 24.1 on my Windows platforms, I
found that psgml ceased to work.
There were two problems. The first I could work around, which
involved to disappearance of (make-local-hook)
. This is
called by psgml-mode
, but according to this
bug report, the function has been obsolete since emacs 21.
Defining a stub make-local-hook in the psgml lisp code fixed that.
The second problem caused me to give up; it involved the use of
now-obsolete back-tick syntax, as witnessed by these lines from the
emacs *Message* buffer:
Loading `psgml': old-style backquotes detected! For information about GNU Emacs and the GNU system, type C-h C-a. Loading `psgml-parse': old-style backquotes detected! [2 times] Parsing prolog... Invalid function: (\` (sgml-is-delim ((\, delim)) ((\, context)) move)) (New file) Loading vc-cvs...done Parsing prolog... Invalid function: (\` (sgml-is-delim ((\, delim)) ((\, context)) move))
The last line in the buffer was caused by hitting the tab key.
Looking at the code, there were many such uses. I also found that
the last update to psgml-mode
occurred in 2009. Perhaps it
was time to see if there was another tool.
There is of course. nxml-mode
is shipped with emacs
(certainly since emacs 23) and seems to offer all the features that
I need. To turn it on, I added this to my .emacs
file:
(require 'nxml-mode) (add-to-list 'auto-mode-alist '("\\.html$" . nxml-mode)) (add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
Rest in peace, psgml-mode
.