PSGML defines a major mode called sgml-mode
. Files with
extensions `.sgml', `.sgm' or `.dtd' will
automatically be edited in SGML mode. To edit some other file in
sgml mode, type M-x sgml-mode RET after finding the
file.
If you can modify the file you can add a Local Variables list (see section `Local Variables in Files' in The Emacs Editor) to the end of the file. This can make Emacs automatically set sgml mode and user options when the file is loaded. The simplest Local Variables list would look like:
<!-- Local Variables: mode: sgml End: -->
You can also put a line at the top of the file to tell emacs to use sgml mode:
<!-- -*- sgml -*- -->
But remember that you can't have a comment before the SGML declaration.
Go to the first, previous, next, last section, table of contents.