xemacs and psgml and windows

Marcel Kunath kunathma@pilot.msu.edu
Thu, 22 Mar 2001 13:02:55 -0500 (EST)


Hey,

I installed XEmacs under Windows. (There is just no good editors in the Windows
environment. =)


1. I got _emacs (win equivalent to .emacs) in my home directory. How do I know
if it gets loaded by default?


2. psgml is installed as well. I added the following lines (at the end) to
_emacs:


(require 'psgml)

(add-to-list 'auto-mode-alist '("\\.sgm" . sgml-mode))
(add-to-list 'auto-mode-alist '("\\.html" . sgml-mode))
(add-to-list 'auto-mode-alist '("\\.adp" . xml-mode))
(add-to-list 'auto-mode-alist '("\\.xml" . xml-mode))
(add-to-list 'auto-mode-alist '("\\.xsl" . xml-mode))

(add-to-list 'sgml-catalog-files
"C:/Corel/Suite8/Programs/Lgcfiles/DocBook4.1/CATALOG")

(setq sgml-markup-faces '((start-tag . font-lock-function-name-face)
                          (end-tag . font-lock-function-name-face)
          (comment . font-lock-comment-face)
          (pi . bold)
          (sgml . bold)
          (doctype . bold)
          (entity . font-lock-type-face)
          (shortref . font-lock-function-name-face)))
(setq sgml-set-face t)
(setq-default sgml-indent-data t)
;; Some convenient key definitions:
(define-key sgml-mode-map "\C-c\C-x\C-e" 'sgml-describe-element-type)
(define-key sgml-mode-map "\C-c\C-x\C-i" 'sgml-general-dtd-info)
(define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity))))


The file C:\Corel\Suite8\Programs\Lgcfiles\DocBook4.1\CATALOG contains the
line:

CATALOG "DocBook4.1/docbook.cat"


I am trying to get SGML highlighting. An SGML document I am trying to open has
the first line:

<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.1.2//EN">

I did notice when I open the file it does add a Menu Item "SGML" to the XEmacs
toolbar. Everything seems to work except the coloring.

3. When inserting an element like <chapter> it also defaults to dumping in this
additional info:

  <!-- one of (CALLOUTLIST GLOSSLIST ITEMIZEDLIST ORDEREDLIST SEGMENTEDLIST
SIMPLELIST VARIABLELIST CAUTION IMPORTANT NOTE TIP WARNING LITERALLAYOUT
PROGRAMLISTING PROGRAMLISTINGCO SCREEN SCREENCO SCREENSHOT SYNOPSIS CMDSYNOPSIS
FUNCSYNOPSIS FORMALPARA PARA SIMPARA ADDRESS BLOCKQUOTE GRAPHIC GRAPHICCO
MEDIAOBJECT MEDIAOBJECTCO INFORMALEQUATION INFORMALEXAMPLE INFORMALFIGURE
INFORMALTABLE EQUATION EXAMPLE FIGURE TABLE MSGSET PROCEDURE SIDEBAR QANDASET
ANCHOR BRIDGEHEAD COMMENT HIGHLIGHTS ABSTRACT AUTHORBLURB EPIGRAPH INDEXTERM
REFENTRY SECT2 SIMPLESECT) -->

How do I turn this feature off?


Tips appreciated,

mk