Commits

Anonymous committed 148c775

fixup commit for tag 'sumo-current'

Comments (0)

Files changed (22)

-_pkg.el
-auto-autoloads.el
-custom-load.el
-package-info
-pdepends.mk
+psgml-api*.html
+psgml*.html
+2007-06-11  Norbert Koch  <viteno@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.45 released.
+
+2007-05-26  Ville Skyttä  <scop@xemacs.org>
+
+	* Sync with upstream 1.3.2.
+
+	* psgml-ids.el: New.
+	* Makefile: Update FSF's address.
+	(AUTHOR_VERSION): 1.3.2.
+	(ELCS): Add psgml-ids.elc.
+	* package-info.in (provides): Add psgml-ids.
+
+	* psgml-html.el (sgml-html-netscape-file): Use browse-url.
+	(sgml-html-kfm-file): Ditto.
+
+2005-04-05  Norbert Koch  <viteno@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.44 released.
+
+2005-04-04  Adrian Aichner  <adrian@xemacs.org>
+
+	* psgml.el: Add auto-mode-alist autoload cookie for .xsd.
+
+2004-06-21  Norbert Koch  <viteno@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.43 released.
+
+2004-06-14  Gerd Boerrigter  <gerd.boerrigter@gmx.net>
+
+	* psgml.el: Rename View menu, so it does not shadow the regular
+	XEmacs View menu.
+
+2003-12-09  Norbert Koch  <viteno@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.42 released.
+
+2003-12-08  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml.el (xml-mode): Make autoload hack autoload-only,
+	add interactive flag.
+
+2003-08-29  Norbert Koch  <viteno@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.41 released.
+
+2003-08-29  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml-html.el: Bring FSF's address up to date.
+	(psgml-html): Include self in the hypermedia customization group.
+	(html-helper-address-string): Don't query the address here.
+
+2003-03-09  Ben Wing  <ben@xemacs.org>
+
+	* Makefile:
+	Delete explicit compile:: and binkit: rules.
+	Don't add custom-load.elc to the list of generated elc's.
+	Use EXPLICIT_DOCS instead of explicitly giving the targets
+	and dependencies.
+
+2003-03-02  Norbert Koch  <nk@viteno.net>
+
+	* Makefile (VERSION): XEmacs package 1.40 released.
+
+	* Makefile (VERSION): XEmacs package 1.39 released.
+
+2003-02-13  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml.el: Autoload sgml-make-options-menu from psgml-xemacs.
+
+2003-01-19  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.38 released.
+
+2003-01-11  Ville Skyttä  <scop@xemacs.org>
+
+	* Sync with upstream 1.3.1, miscellaneous doc fixes.
+
+	* psgml-sysdep.el: New.
+	* ChangeLog.upstream: New.
+	* package-info.in (provides): Add psgml-sysdep.
+	* Makefile (AUTHOR_VERSION): Bump to 1.3.1.
+	(REQUIRES): Add ps-print.
+	(ELCS): Add psgml-sysdep.elc.
+	(EXTRA_SOURCES): Add ChangeLog.upstream.
+
+2003-01-13  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.37 released.
+
+2003-01-06  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml.el: Make auto-mode-alist modifications autoload-only.
+	* psgml-html.el: Ditto.
+
+2003-01-03  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.36 released.
+
+2002-12-18  Ville Skyttä  <scop@xemacs.org>
+
+	* *: Sync trivial stuff from upstream 1.3.1 to reduce
+	diff size.  Mostly docstring and whitespace changes.
+
+2002-11-29  Ben Wing  <ben@xemacs.org>
+
+	* .cvsignore: Remove files now handled automatically by CVS.
+	* Makefile: Use `compile' instead of hard-coded `all'.
+
+2002-10-15  Ville Skyttä  <scop@xemacs.org>
+
+	* Makefile (srckit): Remove.
+
+2002-10-14  Ville Skyttä  <scop@xemacs.org>
+
+	* Makefile (MANUALS): Removed (unused).
+
+2002-10-14  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.35 released.
+
+2002-10-12  Adrian Aichner  <adrian@xemacs.org>
+
+	* psgml.el (sgml-validate-command): Fix custom-type to agree with
+	documentation and implementation.
+	* psgml.el (sgml-xml-validate-command): New.  Paralleling
+	rationale for sgml-xml-declaration.
+	* psgml.el (sgml-declaration): Make variable buffer-local to
+	support xml-mode.
+	* psgml.el (xml-mode): Add docstring, initialize
+	`sgml-validate-command' and `sgml-declaration' from
+	`sgml-xml-validate-command' and `sgml-xml-declaration'
+	respectively.
+
+2002-10-07  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.34 released.
+
+2002-09-30  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml.el: Add autoloaded auto-mode-alist associations.
+	* psgml-html.el: Ditto.
+
+2002-09-06  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.33 released.
+
+2002-09-01  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml-html.el: Cure antisocial behaviour of defining
+	font-lock-variable-name-face and font-lock-reference-face
+	on load, use html-helper-significant-tag-face and
+	html-helper-link-face instead.  Make these and a couple
+	of others with defface, and put them into psgml-html-faces
+	customization group.
+	(psgml-html): Add psgml-html- prefix.
+	(psgml-html-faces): New customization group.
+	(html-helper-bold-face): New (defface).
+	(html-helper-italic-face): Ditto.
+	(html-helper-underline-face): Ditto.
+	(html-helper-strikethrough-face): New.
+	(html-helper-link-face): New (was font-lock-reference-face).
+	(html-helper-significant-tag-face): New (was
+	font-lock-variable-name-face).
+	(html-font-lock-keywords): Use the new faces.
+
+2002-08-26  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.32 released.
+
+2002-08-23  Ville Skyttä  <scop@xemacs.org>
+
+	* Split the package in two, moving all DTDs into psgml-dtds.
+
+	* psgml.el (sgml-data-directory): Prefer psgml-dtds'
+	data-directory over psgml's and sgml's.
+
+	* iso88591.map: Moved here from etc/ to match upstream
+	package layout.
+
+	* etc/*: Remove.
+
+	* Makefile: Remove DTD-related stuff.
+
+2002-08-13  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.31 released.
+
+2002-08-13  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml.el (xml-mode): Workaround a problem with autoload
+	cookies and derived modes by autoloading a dummy autoload.
+
+2002-08-12  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.30 released.
+
+2002-08-07  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml-html.el (html-mode): Set sgml-default-doctype-name
+	to "HTML" (uppercase it).  Thanks to Reuben Thomas.
+
+2002-08-06  Ville Skyttä  <scop@xemacs.org>
+
+	* psgml.el (sgml-declaration): Change :type to choice nil/file.
+	(sgml-xml-declaration): Ditto.
+	Thanks to Reuben Thomas and Adrian Aichner.
+
+2002-08-05  Rendhalver [Peter Brown]  <rendhalver@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.29 released.
+
+2002-08-05  Ville Skyttä  <scop@xemacs.org>
+
+	* Makefile (REQUIRES): Add eterm, fsf-compat and sh-script.
+	(AUTHOR_VERSION): Nit, set to 1.2.2 instead of 1.22...
+
+2002-07-16  Adrian Aichner  <adrian@xemacs.org>
+
+	* .cvsignore: Add generated .info* and .html files.
+
+2002-05-09  Steve Youngs  <youngs@xemacs.org>
+
+	* Makefile (VERSION): XEmacs package 1.28 released.
+
+2002-05-08  Steve Youngs  <youngs@xemacs.org>
+
+	* Makefile (EXTEND_LOAD_PATH): Remove.
+	(all): No need to push anything into the load-path.
+	Don't explicitly load sendmail.
+
+2002-02-15  Alastair Burt  <burt@dfki.de>
+
+	* psgml-html.el (html-mode): Make 'imenu-create-index-function'
+	and 'imenu-sort-function' local variables.
+
 2002-01-29  Steve Youngs  <youngs@xemacs.org>
 
 	* Makefile (clean): Remove the individual files in 'etc/cdtd/'

ChangeLog.upstream

+2005-03-02  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-mode-map): bind C-c C-s to new comman
+	sgml-show-structure.
+	Update autoloads.
+
+	* psgml-edit.el (sgml-show-structure): new command
+	(sgml-show-structure-insert, sgml-show-struct-element-p)
+	(sgml-structure-elements): new functions
+
+2005-02-27  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-content-indent-function): moved
+	(sgml-attribute-indent-function): moved
+
+	* psgml-edit.el (sgml-show-context): use new option
+	sgml-show-context-function.
+	(sgml-show-context-standard, sgml-show-context-backslash): new
+	functions for sgml-show-context-function
+	(sgml-right-menu): new command for use on a mouse button
+
+	* psgml.el (sgml-mode-map): bind C-c C-t to
+	sgml-show-current-element-type
+	(sgml-show-context-function): new option
+
+	* psgml-edit.el (sgml-show-current-element-type): new command
+
+	* psgml.el (sgml-mode-map): change C-c C-p to sgml-load-doctype
+
+	* psgml-parse.el (sgml-load-doctype): make interactive, this is a
+	more useful command than sgml-parse-prolog.
+
+	* psgml-info.el (sgml-describe-dtd): rename sgml-general-dtd-info
+	to sgml-describe-dtd. Keep old name as alias.
+
+	* psgml-other.el (sgml-set-face-for): added face setting for content
+
+	* psgml-parse.el (sgml--pi-element-handler): use sgml-parse-s not
+	sgml-skip-ps.
+
+2005-02-24  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-do-processing-instruction): call
+	sgml--pi-psgml-handler with end point of PI.
+	(sgml--pi-psgml-handler): Take end point, and narrow buffer before
+	parsing.
+
+2005-02-17  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-parse-prolog): apply sgml-general-case to
+	sgml-default-doctype-name.
+
+
+2005-02-09  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-debug): remove sgml-log-message
+	remove log related keybinding/menu entry
+
+	* psgml-parse.el (sgml-compile-dtd, sgml-check-entities)
+	(sgml-log-warning, sgml-error): remove sgml-log-message
+	(sgml-entity-stack): new func
+
+	* psgml-ids.el: New file (From: Jean-Daniel.Fekete)
+	* psgml-edit.el: ID/IDREF patch (From: Jean-Daniel.Fekete)
+	* psgml-maint.el: ID/IDREF patch (From: Jean-Daniel.Fekete)
+	* psgml-parse.el: ID/IDREF patch (From: Jean-Daniel.Fekete)
+
+2003-06-09  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-modify-dtd): added some error checking for
+	the has-seen-elements.
+
+2003-03-28  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-do-processing-instruction): new handling
+	of <?PSGML> processing instruction.
+	(sgml--pi-psgml-handler): new func
+	(sgml--pi-element-handler): new func. handles <?PSGML ELEMENT ..>
+	(sgml-psgml-pi-enable-outside-dtd): new variable. controls when
+	<?PSGML> is evaluated.
+
+2003-03-27  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el: fix wrong file name in error trace
+
+2003-03-25  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-dtd.el (sgml-parse-parameter-literal):
+	Modified to use unibyte-char-to-multibyte if
+	enable-multibyte-characters. I hope this is correct.
+
+2003-03-25  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-dtd.el (sgml-parse-parameter-literal):
+	Modified to use unibyte-char-to-multibyte if
+	enable-multibyte-characters. I hope this is correct.
+
+2003-02-12  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-setup-doctype): add Predefined Entities
+	for XML.
+
+2003-01-24  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-do-move): undo wrong optimization, fix
+	problem with non working exclusions.
+
+2002-12-13  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.3.1 released
+
+2002-09-19  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-parse-prolog): Check if sgml-dtd-info is
+	nil before trying to use it.
+
+2002-08-13  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-edit-attrib-abort): new command
+	(sgml-edit-attrib-mode-map): abort on key C-c C-k
+	(sgml-attribute-buffer): include abort key in header line and use
+	substitute-command-keys.
+	(sgml-edit-attributes): move setting mode to
+	sgml-attribute-buffer.
+
+	* psgml-parse.el (sgml-open-element): add optional net-enabled
+	parameter.
+	(sgml-do-start-tag): use new parameter on sgml-open-element.
+	Fixes bug with NET (tc17).
+
+	* psgml-edit.el (sgml-edit-attrib-field-start,
+	sgml-edit-attrib-clear, sgml-attribute-buffer,
+	sgml-edit-attrib-specification-list): change sgml-category to
+	category. Fix bug with edit attributes.
+	(sgml-change-element-name): insert TAGC before finding new element
+	object. Fix bug with change element name not copying attributes.
+
+2002-05-08  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.3.0 released
+
+	* psgml.el (sgml-default-nonsticky): moved from psgml-other.el
+
+2002-05-07  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-maint.el (psgml-common-files): add psgml-sysdep
+	(psgml-find-source-dir): fix version
+
+2002-04-26  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-mode): make adding to
+	text-property-default-nonsticky conditional on
+	sgml-default-nonsticky to work with Emacs < 21.
+
+2002-04-25  Lennart Staflin  <lenst@lysator.liu.se>
+
+	fixing merge of Dave Love's patch.
+
+2002-02-08  Dave Love  <fx@gnu.org>
+	[Merging from 1.2.4 branch /lenst]
+
+	Changes for various things: Useful DTD-less XML editing; avoiding
+	CL at runtime; some Emacs portability; Mule-related fixes,
+	particularly for non-ASCII names in DTD.
+
+	* psgml-maint.el (psgml-find-source-dir): Fix version number.
+
+	* psgml-info.el (sgml-set-difference, sgml-union): New functions.
+	(sgml-eltype-refrenced-elements): Use them and also use
+	add-to-list instead of pushnew.
+
+	* psgml-dtd.el: Doc and message fixes.
+	(sgml-write-dtd): Use sgml-set-buffer-multibyte and bind
+	coding-system-for-write around write-region.
+	(sgml-merge-attlists): Use copy-sequence, not copy-list.
+
+	* psgml-edit.el: Require cl when compiling.  Don't set
+	byte-compile-warnings.
+	(sgml-quote-attribute-value, sgml-tag-regexp)
+	(sgml-edit-attrib-next): Use documented way of including `-' in
+	regexp range.
+	(sgml-change-start-tag, sgml-insert-attribute)
+	(sgml-make-attrib-menu, sgml-menu-ask): Fix to work without a DTD.
+	(sgml-edit-attrib-next, sgml-tag-regexp): Maybe allow non-ASCII.
+	(sgml--all-possible-elements): Kludge for DTD-less case.
+	(sgml-make-character-reference): Take care over multibyteness.
+	Maybe deal with unicodes.
+	(sgml-edit-attrib-specification-list, sgml-edit-attrib-default)
+	(sgml-edit-attrib-default, sgml-edit-attrib-clear)
+	(sgml-edit-attrib-field-start, sgml-attribute-buffer): Use
+	property name `sgml-category', not `category', which is special in
+	Emacs. [backed out //lenst]
+	(sgml-operate-on-tags): Use sgml-restore-buffer-modified-p.
+
+	* psgml-lucid.el (sgml-insert): Use property name `sgml-category',
+	not `category'. [backed out //lenst]
+
+	* psgml.el: Require cl only when compiling.  Doc fixes.
+	(sgml-mode): Set text-property-default-nonsticky.  In Emacs, use
+	which-fun-mode hook instead of trying to modify mode-line-format.
+	<paragraph-separate>: Maybe allow non-ASCII.
+	(sgml-mode-map): Define unconditionally. [backed out //lenst]
+	(sgml-running-lucid): Defconst, not defvar.
+	(sgml-have-re-char-clases): New constant.
+	(sgml-markup-faces): Default to font-lock faces if available.
+	(sgml-start-tag-regex, sgml-close-angle): Allow non-ASCII if
+	possible.
+	(sgml-angle-distance, sgml-slash-distance): Defvar, not defconst,
+	since it's a user variable.
+	(sgml-restore-buffer-modified-p): New alias.
+	(sgml-parse-colon-path): Use parse-colon-path, if available.
+	[backed out, parse-colon-path is for directories //lenst]
+	(sgml-command-post, sgml-mode): Assume make-local-hook exists.
+
+	* psgml-parse.el: Doc and message fixes.
+	(sgml-dtd-less): New buffer-local variable.
+	(sgml-eltype-name, sgml-eltype-defined, sgml-eltype-token)
+	(sgml-token-eltype, sgml-eltype-mixed, sgml-check-name)
+	(sgml-element-etag-optional, sgml-element-mixed, sgml-parse-name):
+	Avoid unnecessary compiler macros.
+	(sgml-read-element-type, sgml-read-element-name): DTRT for non-nil
+	sgml-dtd-less.
+	(sgml-push-to-entity): Obey sgml-warn-about-undefined-entities.
+	Don't make the buffer unibyte here.  Ensure an old one is
+	multibyte.
+	(sgml-parse-prolog): Set sgml-dtd-less.
+	(sgml-attdecl-default-value): Avoid caddr.
+	(sgml-entity-marked-undefined-p): Avoid cddddr.  Avoid (CL
+	runtime) setter for nthcdr.
+	(sgml-load-dtd): Avoid mapcan.
+	(sgml-bdtd-load): Set buffer unibyte.
+	(sgml-bdtd-merge): Don't set buffer unibyte here.
+	(sgml-set-active-dtd-indicator): Set which-func-mode.
+	(sgml-merge-eltypes): Use copy-sequence, not copy-list.
+	(sgml-open-element-hook, sgml-close-element-hook)
+	(sgml-map-eltypes): Remove redundant level of lambda.
+	(sgml-entity-case, sgml-general-case): Moved before
+	sgml-entity-case use.
+	(sgml-update-display): Call force-mode-line-update.
+	(sgml-parse-attribute-specification-list): Use sgml-dtd-less.
+
+	* psgml-other.el (sgml-insert): Use plist-get rather than CL
+	runtime's getf.
+	(sgml-use-text-properties): Default to t.
+	(sgml-with-modification-state): New macro.
+	(sgml-default-nonsticky): New constant.
+	(sgml-set-face-for): Use sgml-with-modification-state,
+	sgml-default-nonsticky.
+	(sgml-clear-faces): Avoid CL runtime.
+	(next-overlay-at): Remove as consequence of above.
+
+	* psgml-fs.el: Require cl and ps-print when compiling.
+	(fs-do-style, fs-do-style, fs-do-style): Use plist-get rather than
+	CL runtime's getf.
+	(fs-element-with-id): Use compare-strings, not equalp.
+
+	* psgml-dtd.el, psgml-charent.el, psgml-api.el, psgml-info.el:
+	Require cl when compiling.
+
+	* psgml-debug.el: Require cl, elp and edebug when compiling.
+
+
+2002-04-19  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.2.5 released
+
+2002-03-17  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-api.el (sgml-map-content): don't try to map empty
+	elements, no point and the code doesn't work for that case.
+
+2002-02-13  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-auto-insert-required-elements): doc fix.
+	(sgml-balanced-tag-edit): doc fix.
+
+	* psgml-edit.el (sgml-edit-attrib-default): don't make text read-only
+	(sgml-insert-tag): doc fix.
+
+2002-02-09  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el: Explicitly setup prefix keys
+	(sgml-prefix-f-map): new var
+	(sgml-prefix-u-map): new var
+
+2002-02-08  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-set-buffer-multibyte): support setting to
+	default
+	(sgml-compile-dtd): removed sgml-set-buffer-multibyte, this is
+	done by sgml-write-dtd
+	(sgml-push-to-entity): reset buffer to default multibyte support
+
+	* psgml-dtd.el (sgml-write-dtd): fixes for multibyte handling
+
+2001-12-20  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-xml-validate-command): new option. Default for
+	sgml-validate-command in XML mode.
+	(xml-mode): use sgml-xml-validate-command.
+	(xml-mode): remove conditional. Always set sgml-declaration to
+	sgml-xml-declaration.
+
+2001-12-18  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-attribute-buffer): Don't write-protect the
+	"#DEFAULT" marker.
+	(sgml-extract-attribute-value): strip any remains of "#DEFAULT".
+	(sgml-edit-attrib-next): if point is before the attribute value,
+	move to beginning of line to avoid skipping this attribute.
+
+2001-12-16  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.2.4 released
+
+2001-12-16  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-info.el (sgml-eltype-refrenced-elements): use built-in
+	function copy-sequence
+
+2001-12-14  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-set-buffer-multibyte): Mule/multibyte patch
+	from Yasushi Abe.
+	(sgml-compile-dtd): dito.
+	(sgml-bdtd-merge): dito.
+	(sgml-push-to-entity): dito.
+	(sgml-do-entity-ref): fix sgml-warn-about-undefined-entities behviour.
+
+2001-12-06  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-update-display): take max-pos of top-tree
+	not current-tree as that is not always defined at that point.
+
+2001-11-09  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.2.3 released
+
+	* psgml.el (sgml-running-lucid): make sure it gets defined during
+	compilation.
+
+2001-11-04  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-other.el, psgml-parse.el, psgml-debug.el, psgml-edit.el:
+	Fix the obsolete variable `before-change-function' and
+	`after-change-function', which are no longer used by Emacs.
+
+2001-02-10  Adrian Aichner  <adrian@xemacs.org>
+
+	* psgml-dtd.el: Fix typos.
+	* psgml-edit.el: Ditto.
+	* psgml-fs.el: Ditto.
+	* psgml-info.el: Ditto.
+	* psgml-parse.el: Ditto.
+	* psgml.el: Ditto.
+
+Wed Feb 28 00:02:45 2001  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-fs.el (fs-split-tokens): new helper function for use in
+	style sheets.
+
+2001-02-28  Lennart Staflin  <lennarts@infostream.no>
+
+	* psgml-other.el (sgml-split-long-menus): new
+	(sgml-popup-menu): use above
+	(sgml-popup-multi-menu): use above
+
+Wed Feb 21 23:30:07 2001  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-parse-to): remove debug code
+
+2001-02-20  Lennart Staflin  <lennarts@infostream.no>
+
+	* psgml-dtd.el (sgml-check-content): check case of declared
+	content name.
+	(sgml-parse-exception): fix misspelled function name
+	(sgml-declare-entity): Fix wrong case on symbols
+	(sgml-parse-entity-type): for consistency, don't downcase entity
+	type name
+	(sgml-parse-entity-type): Remove case check and intern for
+	notation name. Notation name will be stored as a string.
+
+	* psgml-parse.el (sgml-push-to-entity): remove debugging code
+	(sgml-set-initial-state): Change to use change hooks
+
+Fri Feb  9 01:06:27 2001  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.2.2 released
+
+	* psgml.el (sgml-mode-map): Bind (meta control h) instead of ESC
+	C-h, avoids redefining M-BS
+
+Thu Feb  8 20:08:47 2001  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-info.el: Add provide psgml-info
+
+Sun Oct 22 17:29:53 2000  Marc-Antoine Parent
+
+	* patch from Marc-Antoine Parent
+
+	* psgml-edit.el (sgml-read-attribute-value): include the element name, thus:
+	Value for {attribute name} in {element name} ({type} {Default}):
+
+
+2000-10-11  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-edit.el (sgml-indent-line): new strategy for identifying
+	elements
+
+2000-09-06  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-api.el (sgml-map-content): Use sgml-with-parser-syntax-ro
+
+	* psgml-parse.el (sgml-find-start-point): renamed to
+	sgml-goto-start-point, to indicate that this actually changes the
+	point and buffer. And should always be called inside
+	sgml-with-parser-syntax.
+	(sgml-with-parser-syntax-ro): As sgml-with-parser-syntax also
+	handle restoring buffer modification state.
+	(sgml-last-buffer): New state variable
+	(sgml-with-parser-syntax): set sgml-last-buffer
+	(sgml-mainbuf-point): new function
+	(sgml-max-pos-in-tree): new function
+	(sgml-update-display): don't call sgml-find-start-point, use
+	sgml-max-pos-in-tree to figure out if there is much to parse.
+	(sgml-parse-to): calls sgml-parser-loop directly no
+	sgml-parse-continue.
+	(sgml-parse-continue): use sgml-with-parser-syntax-ro and
+	set-buffer to sgml-last-buffer.
+
+2000-08-24  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml.el (sgml-insert-defaulted-attributes): new option
+	* psgml-edit.el (sgml-insert-attributes): check new option
+
+	* psgml-fs.el (style-format): set ps-left-header to include a
+	style-sheet specified title and the filename. (for ps-print-buffer)
+	(fs-special-styles): New special style 'title' for setting title.
+	(fs-do-style): handle title style
+	(fs-element-content): make element argument optional, defaults to
+	current element.
+
+2000-08-08  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-edit.el (sgml-insert-element): Fix bug with empty element.
+
+Thu Aug  3 07:52:46 2000  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-insert-element): Fix bug when inserting
+	element at end of buffer.
+
+2000-08-03  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-edit.el (sgml-attribute-buffer): Fix missing space for
+	unspecified required attributes.
+
+2000-06-05  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-dtd.el (sgml-parse-parameter-literal): use
+	buffer-substring-no-properties .
+
+2000-05-31  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-api.el (sgml-parse-data): Don't call sgml-parse-loop
+	directly, use sgml-parse-continue.
+
+Sat May 27 00:04:31 2000  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-attr-clean-and-insert): new command. Used to
+	automatically remove #DEFAULT when a character is typed.
+	(sgml-attr-default-keymap): keymap used as only for #DEFAULT in
+	attribute editing.
+
+Mon Apr 24 09:55:14 2000  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-complete): Transform case on inserted names
+	using sgml-general-insert-case or sgml-entity-insert-case.
+
+Sun Apr 16 16:07:55 2000  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-indent-line): compute indentation from
+ 	context, not element under point. Did this change once before but
+ 	had to back it out. This time take care of omitted end-tags by
+ 	choosing parent element as context, if point is at the very end of
+ 	the element. Don't do special attribute indenting for elements
+ 	that occur in data context.
+	(sgml-fill-region): Fix giving up to early.
+	(sgml-do-fill): indent tags of subelements in element context
+
+	* psgml-info.el (sgml-describe-element-type): Use sgml-princ-names
+	for occurs in section.
+
+2000-03-22  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-edit.el (sgml-change-element-name): Add end-tag event if
+	original element is empty. (hmm this isn't quite right). Also use
+	sgml-find-context-of to find element, because -element-of gives
+	the element of the following char.
+
+Tue Jan  4 19:51:03 2000  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-with-parser-syntax): Restore current buffer
+	before restoring syntax table.
+
+Tue Dec 21 20:50:31 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-other.el (sgml-set-face-for): set rear-nonsticky for face
+	when sgml-use-text-properties is true. (Suggested by Dirk Frömbgen)
+
+Sat Dec 18 18:55:02 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-charent.el (sgml-charent-to-display-char): use
+	buffer-substring-no-properties to allow for using text properties
+	for fontification.
+
+1999-11-02  Tim Bradshaw  <tfb@tfeb.org>
+
+ 	* psgml-edit.el (sgml-doctype-insert): made it not loop when it
+ 	gets a bogus nil
+
+1999-12-16  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-parse.el (sgml-parse-prolog): restore buffer modified
+	after parsing. To allow using text properties for fontification.
+	(sgml-parse-continue): dito.
+	(sgml-parse-to): call sgml-parse-continue instead of calling
+	sgml-parser-loop directly.
+
+1999-12-15  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml.el: autoload for sgml-do-set-option
+
+1999-12-03  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml.el (sgml-mode-syntax-table): new variable
+	(sgml-mode): use sgml-mode-syntax-table
+
+1999-11-29  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-validate-error-regexps): Also recognize warnings
+	(:W:) in output from nsgmls.
+
+1999-11-11  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-parse.el (sgml-parse-to): Let sgml-with-parser-syntax wrap
+	a bigger chunk of the code to make sure the syntax table is set up
+	before any buffer changes.
+
+Tue Nov  9 16:25:53 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-modify-dtd): use sgml-general-case on names
+	from modifier.
+
+Mon Nov  8 22:13:12 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-info.el (sgml-eltype-refrenced-elements): Copy sequence
+	before sorting destructively.
+	(sgml-describe-element-type): Include exceptions in info display.
+
+Thu Nov  4 19:07:09 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-note-change-at): If in XML mode and
+ 	previous char is /, back up one char. This allows for the />
+ 	delimiter to be recognized even if the start tag has been
+ 	previously parsed as an improperly ended tag.
+
+	* psgml-edit.el (sgml-last-element): don't use sgml-last-element
+	for XML (there is not omitted tags to account for).
+
+1999-10-21  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-parse.el (sgml-push-to-entity): restore the (erase-buffer)
+	that had been commented out. This is needed for the case when
+	sgml-try-merge-compiled-dtd fails and leaves junk in the buffer.
+
+1999-10-19  Lennart Staflin  <lennarts@infotek.no>
+
+	* Version 1.2.1 released
+
+1999-10-14  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-parse.el (sgml-log-entity-stack): don't use
+	sgml-pop-entity, just loop thru the entity stack and print out the
+	files.
+	(sgml-load-ecat): bind sgml-xml-p while parsing catalog
+
+1999-10-13  Lennart Staflin  <lennarts@infotek.no>
+
+	* psgml-parse.el (sgml-current-file): New variable, holds the name
+	of file name (if any) of the entity beeing parsed in the buffer.
+	(sgml-parse-warning): New func. Log a parser warning, a warning
+	including information about where the error occured. Mostly for
+	DTD parsing.
+	(sgml-log-entity-stack): new factored function.
+	(*) Replaces some sgml-parse-error and sgml-log-warning with
+	sgml-parse-warning.
+	(sgml-parse-catalog-buffer): bind sgml-xml-p while parsing catalog
+
+Sun Oct 10 15:53:12 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.2 released
+
+Wed Oct  6 00:43:37 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.1.7 released
+
+	* psgml-parse.el (sgml-push-to-entity): carry XML-ness to parsed
+	text entities.
+
+	* psgml-charent.el (sgml-display-char-list-filename): new default
+	is "iso8859.map" in the same directory where psgml is installed.
+
+Wed Sep 22 19:34:08 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el: Apply sgml-general-case to attribute name for
+ 	interactive sgml-insert-attribute. Don't test for non empty asl in
+ 	sgml-edit-attrib. A lot of changes in handling text attributes
+ 	when in attribute edit mode.
+
+Sat Aug 14 22:34:59 1999  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-tag-regexp): Recognize XMLs empty tags.
+
+1998-11-16  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-set-local-variable): insert "mode: xml" for
+	xml-mode and "mode: sgml" otherwise
+
+	* psgml-edit.el (sgml-add-element-to-element): add end-tag to
+	empty xml-elements before inserting an element
+
+1998-11-15  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.1.6 released
+
+	* psgml-parse.el (sgml-char-int): from XEmacs
+	(sgml-read-octet): modified for XEmacs
+	(sgml-read-peek): dito.
+	(sgml-read-number): dito.
+
+	* psgml.el (sgml-option-value-indicator): moved here.
+	(sgml-mode): activate-menubar-hook can't be local in XEmacs and
+	sgml-build-custom-menus need to be after the easy-menu-adds.
+
+1998-11-14  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el, psgml-edit.el: Fix from David Megginson to some
+	regexps for _: in names.
+	(sgml-build-custom-menus): Do not call easy-menu-change with empty
+	menu.
+
+	* psgml-edit.el (sgml-do-set-option): Don't modify the *Help*
+	buffer directly, call sgml-append-to-help-buffer. Fixes problem
+	with read-only buffer.
+	(sgml-append-to-help-buffer): new func.
+
+	* psgml.el (sgml-main-menu):  Options handling changed after
+	suggestion and code from Matthias Clasen
+	(sgml-update-all-options-menus): new func. called by
+	activate-menubar-hook
+
+Thu Nov  5 20:59:08 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-parse-processing-instruction): removed let
+	of sgml-markup-start. Was probably wrong solution to problem with
+	sgml-markup-start beeing nil. Added in-declaration parameter. If
+	in a declaration, no fontification should be done.
+	(sgml-parse-prolog): do not call sgml-skip-ds, rather call
+	parse-s, parse-pi as this is what "other prolog" contains.
+
+1998-10-31  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.1.5 released
+
+	* psgml-parse.el (sgml-declared-value-notation): change 'notation
+	to 'NOTATION
+
+Sat Oct 31 20:00:22 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-cache-catalog): Use file-truename for
+	file-attributes, to get modification time from real file and not
+	from symlink.
+
+	* psgml.el (xml-mode): Do not build a syntax table
+	(sgml-dtd-menu): moved Custom DTD's to submenu
+	(sgml-markup-menu): moved Custom Markup to submenu
+	(sgml-build-custom-menus): Make submenus for Custom DTD and Markup
+
+	* psgml-parse.el (xml-parser-syntax): build special syntax table
+	for XML.
+	(sgml-with-parser-syntax): Use sgml-parser-syntax or
+	xml-parser-syntax depending on sgml-xml-p
+
+Wed Oct 28 23:15:38 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-read-element-type): use
+	let (completion-ignore-case sgml-namecase-general)
+
+Sat Oct 24 13:13:48 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-build-custom-menus): Construct sub-menus for
+	custom DTD and custom Markup insert, only if
+	easy-menu-filter-return is not defined otherwise use the :filter
+	facility to build menu when needed.
+
+	* psgml-edit.el (sgml-what-element): Guard call to
+	sgml-deref-shortmap
+
+1998-10-20  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-edit-external-entity): fix from Matthias Clasen
+
+	* psgml.el (sgml-validate-error-regexps): modify regexp to work in
+	Emacs 20.3
+
+1998-09-30  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.1.4 release
+
+Mon Aug 31 21:53:45 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-bdtd-load): Increase version number
+	(sgml-read-dtd): Increase version number
+
+	* psgml-dtd.el (sgml-write-dtd): Increase version number
+
+Sat Aug 15 18:58:25 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-complete): add completion of #-reserved words
+
+Fri Jul  3 18:14:21 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.1.3
+
+	* Makefile.in: Call install with only one source file.
+
+Fri Jul  3 17:54:06 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-complete): ignore case
+
+	* psgml-parse.el (sgml-push-to-entity): use setf to set
+	sgml-entity-marked-undefined-p.
+	(setf sgml-entity-marked-undefined-p): define setf method
+
+Tue Jun 30 22:06:20 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-do-set-option): Added file-list and
+	file-or-nil types contributed by Matthias Clasen
+	<mclasen@sun2.mathematik.uni-freiburg.de>
+
+Tue Jun 30 21:48:39 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-mode-map): C-c C-i calls sgml-add-element-to-element
+
+	* psgml-edit.el (sgml-add-element-to-element): New command.
+
+Wed Jun 24 23:23:38 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-attribute-buffer): Fixed another victim of
+	the case change.
+	(sgml-change-element-name): fix bug with empty XML element
+
+Mon Jun 22 19:58:43 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (psgml-version): Version 1.1.2
+
+	* Installed patch from Matthias Clasen
+	<clasen@pong.mathematik.uni-freiburg.de>.
+	Adding notation to entities and a sgml-notation-handlers variable
+	used by sgml-edit-external-entity.
+
+	* psgml-edit.el (sgml-indent-line): Previous change of
+	sgml-indent-line did not work well with OMITTAG. Restore old
+	functionallity.
+
+Fri Jun 19 18:54:27 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-attribute-buffer):
+	changed case of default value type, here and in many other functions.
+	(sgml-translate-attribute-specification-list): changed case for
+	declared value
+
+	* psgml-parse.el (sgml-parse-attribute-specification-list):
+	changed case of default value type
+
+1998-06-16  Dave Love  <d.love@dl.ac.uk>
+
+	* psgml-edit.el (sgml-read-element-name,
+	sgml-read-attribute-value, sgml-insert-attribute,
+	sgml-custom-markup): Use sgml-namecase-general to set
+	completion-ignore-case.
+
+1998-06-16  Dave Love  <d.love@dl.ac.uk>
+
+	* psgml-parse.el (sgml-push-to-entity): Don't use save-excursion
+	around insert-file-contents -- may break in Emacs 20.3.
+
+Fri Jun 19 10:40:53 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-dtd.el (sgml-check-declared-value): upcase NOTATION
+
+	* psgml-parse.el (sgml-read-element-name): bind
+	completion-ignore-case as suggested by Mark Eichin. Also present
+	element names in the insert case.
+
+Tue Jun 16 00:31:03 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-command-post): added ignore-errors
+
+	* psgml-parse.el (sgml-get-delim-string): new func.
+	(sgml-delim): changed to macro.
+	(sgml-do-usemap): upcase #EMPTY
+	(sgml-parse-xml-comment): set markup type
+
+	* psgml-dtd.el (sgml-validate-default-value-rn): upcase keywords
+	(sgml-declare-entity): remove case fiddling
+
+	* psgml-parse.el (sgml-check-case): remove case fiddling -- retain
+	check.
+
+	* psgml-dtd.el (sgml-validate-declared-value): upcase attribute types
+	(sgml-check-default-value): remove case fiddling -- reserved names
+	should be in upper case.
+
+	* psgml-parse.el (sgml-push-to-entity): use syntax table from
+	current buffer in entity buffer and not the sgml-parser-syntax as
+	XML will use another syntax table.
+
+Wed Jun 10 23:28:42 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-catalog-lookup): Take additional catalogs
+	in right order.
+
+Thu May 14 20:02:42 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* Version 1.1.1
+
+	* psgml.el (psgml-version): new version 1.1.1
+
+	* psgml-dtd.el (sgml-parse-character-reference): upcase funchar
+	names.
+
+	* psgml-edit.el (sgml-indent-line): compute indentation from
+	context, not element under point. Removed special handling of
+	start-tag and document context. Extra indentation if in markup.
+
+	* psgml-parse.el (sgml-parse-external): use upper case keywords.
+	(sgml-check-case): use upper case instead of lower case.
+
+Wed May 13 06:13:05 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-do-marked-section): Change keyword strings
+	to upper case.
+	(sgml-general-case): Use Upcase instead of Downcase.
+	(sgml-parse-markup-declaration): upcase keywords.
+
+Sat Mar 14 21:31:09 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-do-processing-instruction): Added
+	recognition of PSGML NOFILL.
+	(sgml-parse-catalog-buffer): add catalog as a noname entry
+	(sgml-catalog-lookup): handle catalog entries
+
+Thu Mar 12 00:04:52 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-current-element-name): make buffer local
+
+Wed Mar 11 22:11:01 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-insert-start-tag): extended meaning of NET
+	paramenter to insert XML-TAGCE if XML.
+	(sgml-change-start-tag): keep XML-TAGCE
+
+	* psgml-parse.el (sgml-read-element-name): use completing read on
+	all defined element types if in an ANY context.
+	(sgml-check-tag-close): removed check for XML-TAGCE
+	(sgml-do-start-tag): added check for XML-TAGCE
+	(sgml-element-empty): In XML no special handling of elements with
+	declared content of EMPTY, but use conref to signal empty element tag.
+
+	* psgml-dtd.el (sgml-merge-attlists): reverse the list
+
+Tue Mar 10 20:13:11 1998  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el: Merged David Megginson's latest xml modifications.
+
+Sat Nov 15 20:50:35 1997  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-parse-attribute-value-specification): New func.
+	(sgml-parse-attribute-specification-list): use new func. This
+	changes an error to a warning to make better error recovery when
+	illegal characters occurs in starttag.
+
+Sun Aug 17 20:22:28 1997  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-cache-catalog): remove file-truename. This
+	made relative filenames refer to the wrong directory if the
+	catalog file was a symlink.
+
+Thu Jul 24 22:36:15 1997  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-modify-dtd): fixed bug in handling
+	sgml-parent-document.
+
+Mon May 19 18:43:32 1997  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-edit.el (sgml-expand-entity-reference): changed to allow
+	point to be within entity referens, not only at start of ref. As
+	suggested by Matthias Clasen.
+	(sgml-edit-external-entity): new command contributed by Matthias
+	Clasen <clasen@netzservice.de>
+
+	* psgml-charent.el (sgml-charent-to-display-char): fix bug in regexp.
+
+Sat Mar 15 19:20:57 1997  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml-parse.el (sgml-check-tag-close): change sgml-error to
+ 	sgml-log-warning
+
+Sun Jan 12 19:15:32 1997  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (psgml-version): bump version
+
+Fri Nov 22 20:29:44 1996  Lennart Staflin  <lenst@lysator.liu.se>
+
+	* psgml.el (sgml-parse-colon-path): use path-separator if
+	available.
-# Makefile for psgml support lisp code
+# Makefile for psgml lisp code
 
 # This file is part of XEmacs.
 
 
 # You should have received a copy of the GNU General Public License
 # along with XEmacs; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA.
 
-VERSION = 1.26
-AUTHOR_VERSION = 1.22
+VERSION = 1.45
+AUTHOR_VERSION = 1.3.2
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = psgml
 PKG_TYPE = regular
-REQUIRES = xemacs-base edit-utils edebug xemacs-devel mail-lib
+REQUIRES = xemacs-base edit-utils edebug xemacs-devel mail-lib fsf-compat \
+	eterm sh-script ps-print
 CATEGORY = standard
 
 ELCS = iso-sgml.elc psgml-api.elc psgml-charent.elc psgml-debug.elc \
 	psgml-dtd.elc psgml-edit.elc psgml-fs.elc psgml-html.elc \
-	psgml-info.elc psgml-parse.elc psgml-xemacs.elc psgml.elc
+	psgml-ids.elc psgml-info.elc psgml-parse.elc psgml-xemacs.elc \
+	psgml.elc psgml-sysdep.elc
 
-INFO_FILES = $(PACKAGE).info* $(PACKAGE)-api.info
-HTML_FILES = $(PACKAGE)*.html $(PACKAGE)-api*.html
-HTML_DEP = $(PACKAGE).html $(PACKAGE)-api.html
-TEXI_FILES = $(PACKAGE).texi $(PACKAGE)-api.texi
-MANUALS = $(PACKAGE) $(PACKAGE)-api
+EXPLICIT_DOCS = $(PACKAGE).texi $(PACKAGE)-api.texi
 
-DATA_FILES = $(wildcard etc/[EHRWhisw]*) etc/CATALOG $(wildcard etc/*ent) \
-	     $(wildcard etc/*.dtd) $(wildcard etc/*.mod) $(wildcard etc/*.dcl)
+DATA_FILES = iso88591.map
 DATA_DEST = $(PACKAGE)
 
-DATA_1_FILES = $(shell $(XEMACS) -batch -no-autoloads -eval "$(GET_CDTD_FILES)")
-GET_CDTD_FILES = \
-(progn \
-  (find-file \
-   \"etc/ECAT\") \
-  (princ \
-    (replace-in-string \
-     (buffer-string) \
-     \"FILE.*[ \\t]+\\\\([^ \\t]+\\\\)[ \\r\\t]*\\n\" \
-     \" etc/\\\\1\"))))
+EXTRA_SOURCES = ChangeLog.upstream
 
-DATA_1_DEST = $(PACKAGE)/cdtd
-
-DATA_2_FILES = $(wildcard etc/ISO_8879-1986/entities/[A,D-Z]*) \
-               $(wildcard etc/ISO_8879-1986/entities/*.ent)
-DATA_2_DEST = $(PACKAGE)/ISO_8879-1986/entities
+# We need to set this to an existing directory when building the package.
+PRELOADS = -eval "(setq sgml-data-directory (expand-file-name \".\"))"
 
 include ../../XEmacs.rules
-
-GENERATED += custom-load.elc
-
-# APA: XEmacs native NT currently (2000-06-23) has shortcomings we
-# need to temporarily work around.
-ifeq ($(XEMACS_NATIVE_NT),t)
-# APA: XEmacs native Windows 2000 currently needs this quoting of
-# command-line-rguments.
-EXTEND_LOAD_PATH = (push (expand-file-name \".\") load-path)
-SGML_DATA_DIRECTORY = (expand-file-name \"etc\")
-SGML_ECAT_FILES = (expand-file-name \"ECAT\" sgml-data-directory)
-SGML_CATALOG_FILES = (expand-file-name \"CATALOG\" sgml-data-directory)
-else
-EXTEND_LOAD_PATH = (push (expand-file-name \".\") load-path)
-SGML_DATA_DIRECTORY = (expand-file-name \"etc\")
-SGML_ECAT_FILES = (expand-file-name \"ECAT\" sgml-data-directory)
-SGML_CATALOG_FILES = (expand-file-name \"CATALOG\" sgml-data-directory)
-endif
-PRELOADS = -eval "(setq sgml-data-directory $(SGML_DATA_DIRECTORY))"
-
-$(DATA_1_FILES): force
-
-all:: $(ELCS) auto-autoloads.elc custom-load.elc \
-	$(PACKAGE).info $(PACKAGE)-api.info \
-	etc/ECAT etc/CATALOG $(DATA_1_FILES) $(DATA_2_FILES) etc/*.ent
-	mkdir -p etc/cdtd
-	$(BOOT_XEMACS) -eval "$(EXTEND_LOAD_PATH)" \
-		$(PRELOADS) \
-	       -l sendmail -l psgml-html -l psgml-parse \
-               -eval "(setq sgml-auto-activate-dtd t  \
-			    sgml-ecat-files (list $(SGML_ECAT_FILES))  \
-			    sgml-catalog-files (list $(SGML_CATALOG_FILES)))" \
-	       -f sgml-compile-all-dtds
-
-# I left this target here even though 'clean' is usually done from
-# XEmacs.rules because it was the easiest way to remove the generated
-# files in 'etc/cdtd/' and keep the directory in tact so a
-# '.cvsignore' file could be used.  And I didn't want to put a special
-# case in XEmacs.rules just for the benefit of 1 package. <youngs@xemacs.org>
-clean:: 
-	rm -f etc/cdtd/docbook etc/cdtd/html* etc/cdtd/mathml \
-		etc/cdtd/xhtml1-* $(ELCS) $(INFO_FILES) auto-autoloads.elc \
-		custom-load.elc
-
-srckit: srckit-std
-
-binkit: binkit-common
-
-# Force rebuilding with this pseudo-target.
-force:
-This is the READ ME file for psgml.el version 1.2.2.       -*- text -*-
+This is the READ ME file for psgml.el version 1.3.2.       -*- outline -*-
 
-This is a BETA release of PSGML. Release 1.2.2 fixes a number of bugs
-in 1.2.1.
+This is an ALPHA release. 
 
 
-PSGML is a major mode for editing SGML and XML documents.  It works with
-GNU Emacs 19.34, 20.3 and later or with XEmacs 19.9 and later.  PSGML
-contains a simple SGML parser and can work with any DTD.  Functions
-provided includes menus and commands for inserting tags with only the
-contextually valid tags, identification of structural errors, editing of
-attribute values in a separate window with information about types and
-defaults, and structure based editing.
+* User interface changes
 
-To install PSGML you first need to uncompress and unpack the source
-archive.  This is done with the `gunzip' and `tar' commands.
+** Rename sgml-general-dtd-info to sgml-describe-dtd. Keep old name as
+   alias.
 
-     gunzip psgml-1.2.2.tar.gz; tar xf psgml-1.2.2.tar
+** Made menus compact, only one top level menu.
 
-This should create a subdirectory to the current directory with the
-source code. This directory contains a `configure' command (see the file
-INSTALL for more information about configure).  You can use the
-`configure' command to configure the package or you can load the file
-`psgml-maint' and execute the `psgml-compile-files' command.
+** Added new function sgml-show-structure (C-c C-s)
+(May need latest emacs version (22))
 
-Place the `*.el' and the `*.elc' files in a directory where Emacs can
-find it (i.e. one of the directories in the `load-path' variable, you
-can add a directory to this variable in your `.emacs'.)
+** Changed C-c C-t to sgml-show-current-element-type
+New more comprehensive information display.
 
-If you use the `configure' approach, compile psgml with `make' and the
-you can run `make install' to install it in the system library
-`site-lisp'.  The files are installed in a subdirectory named `psgml'.
-The location of `site-lisp' is figured out by `configure', but you can
-change it in the `Makefile'.  You need to make sure that this
-subdirectory is in Emacs `load-path'.
+** New mouse menu, sgml-right-menu on S-mouse-3 
+If invoked on a start-tag will include entries to manipulate the
+tag/element, including setting attributes. If invoked in content it
+will be a menu of valid elements.
 
-Put the following line in your .emacs:
+** The <?PSGML> process instruction
+Not new, but now documented and improved.
 
-     (autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
-     (autoload 'xml-mode "psgml" "Major mode to edit XML files." t)
+<?PSGML ELEMENT FOO  
+     face=italic
+     nofill=t
+     help-text="marks a foo"
+     attnames=("ID" "STYLE")
+     structure=ignore ?>
 
-You may also want to set up search paths for external entities,
-See the section Entity manager in the psgml.info manual.
+Must be placed in the DTD.
 
-The `psgml.info' is the documentation for PSGML in the info format.  You
-can read this with the Emacs command `C-u C-h i'.  You can also install
-the file in your systems info directory and edit the `dir' file to
-include `psgml.info' in the menu.
-
-The info file `psgml.info' is created from the texinfo file
-`psgml.texi'.  The texinfo file can also be used to create a hard copy
-of the documentation.  To do this you need the TeX program and a copy of
-`texinfo.tex'.
-
+-*-coding: iso-8859-1; -*-
+192 [Agrave]
+193 [Aacute]
+194 [Acirc ]
+195 [Atilde]
+196 [Auml  ]
+197 [Aring ]
+198 [AElig ]
+199 [Ccedil]
+200 [Egrave]
+201 [Eacute]
+202 [Ecirc ]
+203 [Euml  ]
+204 [Igrave]
+205 [Iacute]
+206 [Icirc ]
+207 [Iuml  ]
+208 [ETH   ]
+209 [Ntilde]
+210 [Ograve]
+211 [Oacute]
+212 [Ocirc ]
+213 [Otilde]
+214 [Ouml  ]
+216 [Oslash]
+217 [Ugrave]
+218 [Uacute]
+219 [Ucirc ]
+220 [Uuml  ]
+221 [Yacute]
+222 [THORN ]
+223 [szlig ]
+224 [agrave]
+225 [aacute]
+226 [acirc ]
+227 [atilde]
+228 [auml  ]
+229 [aring ]
+230 [aelig ]
+231 [ccedil]
+232 [egrave]
+233 [eacute]
+234 [ecirc ]
+235 [euml  ]
+236 [igrave]
+237 [iacute]
+238 [icirc ]
+239 [iuml  ]
+240 [eth   ]
+241 [ntilde]
+242 [ograve]
+243 [oacute]
+244 [ocirc ]
+245 [otilde]
+246 [ouml  ]
+248 [oslash]
+249 [ugrave]
+250 [uacute]
+251 [ucirc ]
+252 [uuml  ]
+253 [yacute]
+254 [thorn ]
+255 [yuml  ]
+34 "
+192 Ŕ
+193 Á
+194 Â
+195 Ă
+196 Ä
+197 Ĺ
+198 Ć
+199 Ç
+200 Č
+201 É
+202 Ę
+203 Ë
+204 Ě
+205 Í
+206 Î
+207 Ď
+208 Đ
+209 Ń
+210 Ň
+211 Ó
+212 Ô
+213 Ő
+214 Ö
+216 Ř
+217 Ů
+218 Ú
+219 Ű
+220 Ü
+221 Ý
+222 Ţ
+223 ß
+224 ŕ
+225 á
+226 â
+227 ă
+228 ä
+229 ĺ
+230 ć
+231 ç
+232 č
+233 é
+234 ę
+235 ë
+236 ě
+237 í
+238 î
+239 ď
+240 đ
+241 ń
+242 ň
+243 ó
+244 ô
+245 ő
+246 ö
+248 ř
+249 ů
+250 ú
+251 ű
+252 ü
+253 ý
+254 ţ
+255 ˙
+192 &Agrave;
+193 &Aacute;
+194 &Acirc;
+195 &Atilde;
+196 &Auml;
+197 &Aring;
+198 &AElig;
+199 &Ccedil;
+200 &Egrave;
+201 &Eacute;
+202 &Ecirc;
+203 &Euml;
+204 &Igrave;
+205 &Iacute;
+206 &Icirc;
+207 &Iuml;
+208 &ETH;
+209 &Ntilde;
+210 &Ograve;
+211 &Oacute;
+212 &Ocirc;
+213 &Otilde;
+214 &Ouml;
+216 &Oslash;
+217 &Ugrave;
+218 &Uacute;
+219 &Ucirc;
+220 &Uuml;
+221 &Yacute;
+222 &THORN;
+223 &szlig;
+224 &agrave;
+225 &aacute;
+226 &acirc;
+227 &atilde;
+228 &auml;
+229 &aring;
+230 &aelig;
+231 &ccedil;
+232 &egrave;
+233 &eacute;
+234 &ecirc;
+235 &euml;
+236 &igrave;
+237 &iacute;
+238 &icirc;
+239 &iuml;
+240 &eth;
+241 &ntilde;
+242 &ograve;
+243 &oacute;
+244 &ocirc;
+245 &otilde;
+246 &ouml;
+248 &oslash;
+249 &ugrave;
+250 &uacute;
+251 &ucirc;
+252 &uuml;
+253 &yacute;
+254 &thorn;
+255 &yuml;
+192 &#x00C0;
+193 &#x00C1;
+194 &#x00C2;
+195 &#x00C3;
+196 &#x00C4;
+197 &#x00C5;
+198 &#x00C6;
+199 &#x00C7;
+200 &#x00C8;
+201 &#x00C9;
+202 &#x00CA;
+203 &#x00CB;
+204 &#x00CC;
+205 &#x00CD;
+206 &#x00CE;
+207 &#x00CF;
+208 &#x00D0;
+209 &#x00D1;
+210 &#x00D2;
+211 &#x00D3;
+212 &#x00D4;
+213 &#x00D5;
+214 &#x00D6;
+216 &#x00D8;
+217 &#x00D9;
+218 &#x00DA;
+219 &#x00DB;
+220 &#x00DC;
+221 &#x00DD;
+222 &#x00DE;
+223 &#x00DF;
+224 &#x00E0;
+225 &#x00E1;
+226 &#x00E2;
+227 &#x00E3;
+228 &#x00E4;
+229 &#x00E5;
+230 &#x00E6;
+231 &#x00E7;
+232 &#x00E8;
+233 &#x00E9;
+234 &#x00EA;
+235 &#x00EB;
+236 &#x00EC;
+237 &#x00ED;
+238 &#x00EE;
+239 &#x00EF;
+240 &#x00F0;
+241 &#x00F1;
+242 &#x00F2;
+243 &#x00F3;
+244 &#x00F4;
+245 &#x00F5;
+246 &#x00F6;
+248 &#x00F8;
+249 &#x00F9;
+250 &#x00FA;
+251 &#x00FB;
+252 &#x00FC;
+253 &#x00FD;
+254 &#x00FE;
+255 &#x00FF;
    filename FILENAME
    md5sum MD5SUM
    size SIZE
-   provides (iso-sgml psgml-api psgml-charent psgml-debug psgml-dtd psgml-edit psgml-fs psgml-html psgml-info psgml-parse psgml-xemacs psgml sgml-mode)
+   provides (iso-sgml psgml-api psgml-charent psgml-debug psgml-dtd psgml-edit psgml-fs psgml-html psgml-ids psgml-info psgml-parse psgml-sysdep psgml-xemacs psgml sgml-mode)
    requires (REQUIRES)
    type regular
 ))
 (provide 'psgml-api)
 (require 'psgml)
 (require 'psgml-parse)
-
+(eval-when-compile (require 'cl))
 
 ;;;; Mapping: map and modify
 
   (sgml-pop-all-entities)
   (sgml-need-dtd)
   (sgml-element-end element)		; Make sure all content is parsed
-  (let ((main-buffer-max (point-max)))
-    (save-excursion
-      (sgml-with-parser-syntax-ro
-       (sgml-set-parse-state element 'start)
-       (when (eobp) (sgml-pop-entity))
-       (when (eolp) (forward-char 1))
-       (sgml-parse-data main-buffer-max data-fun pi-fun entity-fun)
-       (let ((c (sgml-tree-content element)))
-         (while c
-           (sgml-pop-all-entities)
-           (funcall element-fun c)
-           (sgml-set-parse-state c 'after)
-           (sgml-parse-data main-buffer-max data-fun pi-fun entity-fun)
-           (setq c (sgml-tree-next c))))))
-    )
-  (sgml-pop-all-entities))
+  (unless (sgml-element-empty element)
+    (let ((main-buffer-max (point-max)))
+      (save-excursion
+        (sgml-with-parser-syntax-ro
+         (sgml-set-parse-state element 'start)
+         (when (eobp) (sgml-pop-entity))
+         (when (eolp) (forward-char 1))
+         (sgml-parse-data main-buffer-max data-fun pi-fun entity-fun)
+         (let ((c (sgml-tree-content element)))
+           (while c
+             (sgml-pop-all-entities)
+             (funcall element-fun c)
+             (sgml-set-parse-state c 'after)
+             (sgml-parse-data main-buffer-max data-fun pi-fun entity-fun)
+             (setq c (sgml-tree-next c)))))))))
 
 (defun sgml-parse-data (sgml-goal sgml-data-function sgml-pi-function
 				  sgml-entity-function)
 \input texinfo   @c -*-texinfo-*-
 @c %**start of header
+@c XEmacs change
 @setfilename ../info/psgml-api.info
+@c @setfilename psgml-api.info
 @settitle psgml-api
 @c @setchapternewpage odd
 @c %**end of header
 ;;  Functions to convert character entities into displayable characters
 ;;  and displayable characters back into character entities.
 
+;; This should either use iso-cvt or do better with a multilingual set of entities 
+
 
 ;;;; Code:
 
 (provide 'psgml-charent)
 (require 'psgml-parse)
+(eval-when-compile (require 'cl))
 
 
 ;;;; Variable declarations
 
 (defvar sgml-display-char-list-filename
   (expand-file-name "iso88591.map"
+                    ;; XEmacs change: use data-directory, try "sgml" too.
                     (file-name-directory
                      (or (locate-data-directory "psgml")
                          (locate-data-directory "sgml"))))
   "*Name of file holding relations between character codes and character
-names of displayable characters")
+names of displayable characters.")
 
 (defvar sgml-display-char-alist-cache nil)
 
   (let (key disp-char alist)
     (while (re-search-forward "^\\([0-9]+\\)[ \t]+\\(.+\\)$" nil t)
       (setq key (buffer-substring (match-beginning 2) (match-end 2)))
-      (setq disp-char
-	    (char-to-string
-	     (string-to-number
-	      (buffer-substring (match-beginning 1) (match-end 1)))))
+      (setq disp-char (string-to-number (buffer-substring (match-beginning 1)
+							  (match-end 1))))
+      (if (fboundp 'unibyte-char-to-multibyte)
+	  (setq disp-char (unibyte-char-to-multibyte disp-char)))
+      (setq disp-char (char-to-string disp-char))
       (push (cons key disp-char)
 	    alist))
     alist))
       (goto-char (point-min))
       (sgml-with-parser-syntax
        (while (re-search-forward "&\\(\\w\\(\\w\\|\\s_\\)*\\);?" nil t)
-	 (setq charent (buffer-substring
+	 (setq charent (buffer-substring-no-properties
                         (match-beginning 1) (match-end 1)))
 	 (if (setq replacement (cdr (assoc charent charent-to-char)))
 	     (replace-match replacement t t)))))))
   (let ((case-fold-search nil))
     (save-excursion
       (loop for pair in (sgml-charent-to-dispchar-alist)
-	do (goto-char (point-min))
-	(while (search-forward (cdr pair) nil t)
-	  (replace-match (concat "&" (car pair) ";") t t))))))
+	    do (goto-char (point-min))
+	    (while (search-forward (cdr pair) nil t)
+	      (replace-match (concat "&" (car pair) ";") t t))))))
 
 
 
 ;;;;\filename psgml-debug.el
-;;;\Last edited: 2000-06-07 07:29:59 lenst
+;;;\Last edited: 2001-03-10 00:32:00 lenst
 ;;;\RCS $Id$
 ;;;\author {Lennart Staflin}
 ;;;\maketitle
 (require 'psgml-edit)
 (require 'psgml-dtd)
 (autoload 'sgml-translate-model "psgml-dtd" "" nil)
-
-;; XEmacs change
 (eval-when-compile
-  (require 'edebug)
   (require 'cl)
-  (require 'elp))
+  (require 'elp)
+  (require 'edebug))
 
 ;;;; Debugging
 
   (interactive)
   (setq sgml-dtd-info (sgml-pstate-dtd sgml-buffer-parse-state)
 	sgml-top-tree (sgml-pstate-top-tree sgml-buffer-parse-state))
-  (sgml-find-start-point (point))
+  (sgml-goto-start-point (point))
   (message "%s" (sgml-dump-node sgml-current-tree)))
 
 (defun sgml-dump-tree (arg)
 	  (progn (set-buffer standard-output)
 		 (erase-buffer))
 	(set-buffer cb))
-    
+
       (sgml-dump-rec (sgml-pstate-top-tree sgml-buffer-parse-state))
 
       ))
 )
 
 (eval-when (load)
-  (unless running-xemacs
+  (unless running-xemacs ;; XEmacs change
     (def-edebug-spec sgml-with-parser-syntax (&rest form))
     (def-edebug-spec sgml-with-parser-syntax-ro (&rest form))
     (def-edebug-spec sgml-skip-upto (sexp))
    (t
     (princ (format "%sand-state\n" (make-string indent ? )))
     (sgml-dp-state (sgml-and-state-substate state) (+ 2 indent))
-    (princ (format "%s--next\n" (make-string indent ? )))    
+    (princ (format "%s--next\n" (make-string indent ? )))
     (sgml-dp-state (sgml-and-state-next state)     (+ 2 indent))
-    (princ (format "%s--dfas\n" (make-string indent ? )))        
+    (princ (format "%s--dfas\n" (make-string indent ? )))
     (loop for m in (sgml-and-state-dfas state)
 	  do (sgml-dp-model m (+ indent 2))
 	  (princ (format "%s--\n" (make-string indent ? )))))))
     (with-output-to-temp-buffer "*Testing psgml*"
       (while
 	  (progn
-	    (setq file (format "/ni/src/sgmls-1.1/test/test%03d.sgm"
+	    (setq file (format "/u2/src/sgmls-1.1/test/test%03d.sgm"
 			       start))
 	    (file-exists-p file))
 	(princ (format "*** File test%03d ***\n" start))
 	  sgml-copy-moves
 	  ;; is ps*
 	  sgml-do-parameter-entity-ref
-	  ;; 
+	  ;;
 	  sgml-make-primitive-content-token
 	  sgml-push-to-entity
 	  sgml-lookup-entity
 	  ))
   (elp-instrument-list))
 
-;;;; Structure Viewing and Navigating
-
-(require 'psgml-api)
-
-(defvar show-structure-buffer nil)
-(defvar show-structure-positions nil)
-(defvar show-structure-source-buffer nil)
-
-(defun show-structure ()
-  (interactive)
-  (let* ((source (current-buffer))
-         (result (get-buffer-create "*Struct*"))
-         (show-structure-buffer result))
-    (set-buffer result)
-    (erase-buffer)
-    (make-local-variable 'show-structure-positions)
-    (setq show-structure-positions nil)
-    (make-local-variable 'show-structure-source-buffer)
-    (setq show-structure-source-buffer source)
-    (use-local-map (make-sparse-keymap))
-    (local-set-key "\C-c\C-c" 'show-structure-goto)
-    (set-buffer source)
-    (show-element (sgml-top-element))
-    (display-buffer result)))
-
-
-(defun show-structure-goto ()
-  (interactive)
-  (beginning-of-line)
-  (let ((pos-pair (assoc (point) show-structure-positions)))
-    (when pos-pair
-      (switch-to-buffer show-structure-source-buffer)
-      (goto-char (cdr pos-pair)))))
-
-
-(defun show-struct-element-p (element)
-  (or (and (not (sgml-element-data-p element))
-           (not (sgml-element-empty element)))
-      (sgml-element-appdata element 'structure)))
-
-
-(defun show-element (element)
-  (cond ((show-struct-element-p element)
-         (let ((gi (sgml-element-gi element))
-               (level (sgml-element-level element)))
-           (save-excursion
-             (set-buffer show-structure-buffer)
-             (if (not (bolp))
-                 (insert "\n"))
-             (push (cons (point) (sgml-element-start element))
-                   show-structure-positions)
-             (insert (format "%s[%15s] " (make-string (- level 1) ? ) gi))))
-         (catch 'show-data-stop
-             (show-element-data element))
-         (sgml-map-content element #'show-element))))
-
-(defun show-element-data (element)
-  (sgml-map-content element #'show-element-data #'show-data)
-  (throw 'show-data-stop nil))
-
-(defun show-data (data)
-  (save-excursion
-    (set-buffer show-structure-buffer)
-    (let ((start (point)))
-      (insert data)
-      (let ((end (point)))
-        (subst-char-in-region start end ?\n ? )
-        (when (> (current-column) fill-column)
-          (move-to-column fill-column)
-          (delete-region (point) end)
-          (throw 'show-data-stop nil))))))
-
-;;;; Show current element type
-;; Candidate for C-c C-t
-
-(autoload 'sgml-princ-names "psgml-info")
-
-(define-key sgml-mode-map "\C-c\C-t" 'sgml-show-current-element-type)
-
-(defun sgml-show-current-element-type ()
-  (interactive)
-  (let* ((el (sgml-find-context-of (point)))
-         (et (sgml-element-eltype el)))
-    (with-output-to-temp-buffer "*Current Element Type*"
-      (princ (format "ELEMENT: %s%s\n" (sgml-eltype-name et)
-                     (let ((help-text (sgml-eltype-appdata et 'help-text)))
-                       (if help-text
-                           (format " -- %s" help-text)
-                           ""))))
-      (when sgml-omittag
-        (princ (format "\n Start-tag is %s.\n End-tag is %s.\n"
-                       (if (sgml-eltype-stag-optional et)
-                           "optional" "required")
-                       (if (sgml-eltype-etag-optional et)
-                           "optional" "required"))))
-      ;; ----
-      (princ "\nCONTENT: ")
-      (cond ((symbolp (sgml-eltype-model et)) (princ (sgml-eltype-model et)))
-	    (t
-	     (princ (if (sgml-eltype-mixed et)
-                        "mixed\n"
-                      "element\n"))	     
-             (sgml-print-position-in-model el et (point) sgml-current-state)
-             (princ "\n\n")
-	     (sgml-princ-names
-	      (mapcar #'symbol-name (sgml-eltype-refrenced-elements et))
-              "All: ")))
-      (let ((incl (sgml-eltype-includes et))
-            (excl (sgml-eltype-excludes et)))
-        (when (or incl excl)
-          (princ "\n\nEXCEPTIONS:"))
-        (when incl
-          (princ "\n + ")
-          (sgml-princ-names (mapcar #'symbol-name incl)))
-        (when excl
-          (princ "\n - ")
-          (sgml-princ-names (mapcar #'symbol-name excl))))
-      ;; ----
-      (princ "\n\nATTRIBUTES:\n")
-      (sgml-print-attlist et)
-      ;; ----
-      (let ((s (sgml-eltype-shortmap et)))
-	(when s
-	  (princ (format "\nUSEMAP: %s\n" s))))
-      ;; ----
-      (princ "\nOCCURS IN:\n")
-      (let ((occurs-in ()))
-	(sgml-map-eltypes
-	 (function (lambda (cand)
-		     (when (memq et (sgml-eltype-refrenced-elements cand))
-		       (push cand occurs-in))))
-	 (sgml-pstate-dtd sgml-buffer-parse-state))
-        (sgml-princ-names (mapcar 'sgml-eltype-name
-                                  (sort occurs-in (function string-lessp))))))))
-
-(defun sgml-print-attlist (et)
-  (let ((ob (current-buffer)))
-    (set-buffer standard-output)
-    (unwind-protect
-        (loop
-         for attdecl in (sgml-eltype-attlist et) do
-         (princ " ")
-         (princ (sgml-attdecl-name attdecl))
-         (let ((dval (sgml-attdecl-declared-value attdecl))
-               (defl (sgml-attdecl-default-value attdecl)))
-           (when (listp dval)
-             (setq dval (concat (if (eq (first dval)
-                                        'NOTATION)
-                                    "#NOTATION (" "(")
-                                (mapconcat (function identity)
-                                           (second dval)
-                                           "|")
-                                ")")))
-           (indent-to 15 1)
-           (princ dval)
-           (cond ((sgml-default-value-type-p 'FIXED defl)
-                  (setq defl (format "#FIXED '%s'"
-                                     (sgml-default-value-attval defl))))
-                 ((symbolp defl)
-                  (setq defl (upcase (format "#%s" defl))))
-                 (t
-                  (setq defl (format "'%s'"
-                                     (sgml-default-value-attval defl)))))
-
-           (indent-to 48 1)          
-           (princ defl)
-           (terpri)))
-      (set-buffer ob))))
-
-
-(defun sgml-print-position-in-model (element element-type buffer-pos parse-state)
-  (let ((u (sgml-element-content element))
-        (names nil))
-    (while (and u (>= buffer-pos (sgml-element-end u)))
-      (push (sgml-element-gi u) names)
-      (setq u (sgml-element-next u)))
-    (when names
-      (sgml-princ-names (nreverse names) " " ", ")
-      (princ "\n")))
-  (princ " ->")
-  (let* ((state parse-state)
-         (required-seq                  ; the seq of req el following point
-          (loop for required = (sgml-required-tokens state)
-                while (and required (null (cdr required)))
-                collect (sgml-eltype-name (car required))
-                do (setq state (sgml-get-move state (car required)))))
-         (last-alt
-          (mapcar 'sgml-eltype-name
-                  (append (sgml-optional-tokens state)
-                          (sgml-required-tokens state)))))
-    (cond
-     (required-seq
-      (when last-alt
-        (nconc required-seq
-               (list (concat "("
-                             (mapconcat (lambda (x) x)
-                                        last-alt " | ")
-                             (if (sgml-final state)
-                                 ")?" ")")))))
-      (sgml-princ-names required-seq " " ", "))
-
-     (last-alt
-      (sgml-princ-names last-alt " (" " | ")
-      (princ ")")
-      (when (sgml-final state)
-        (princ "?"))))))
-
-;;;; Adding appdata to element types
-;;; Candidate for PI PSGML processing
-
-(defvar sgml-psgml-pi-enable-outside-dtd nil)
-
-(defun sgml-eval-psgml-pi ()
-  (interactive)
-  (let ((sgml-psgml-pi-enable-outside-dtd t))
-    (sgml-parse-to-here)))
-
-(define-key sgml-mode-map "\e\C-x" 'sgml-eval-psgml-pi)
-
-(defun sgml--pi-element-handler ()
-  (sgml-skip-ps)
-  (let ((eltype (sgml-lookup-eltype (sgml-parse-name)))
-        name value)
-    (sgml-skip-ps)
-    (while (setq name (sgml-parse-name))
-      ;; FIXME: check name not reserved
-      (sgml-skip-ps)
-      (cond ((sgml-parse-delim "VI")
-             (sgml-skip-ps)
-             (setq value
-                   (if (looking-at "['\"]")
-                       (sgml-parse-literal)
-                     (read (current-buffer)))))
-            (t
-             (setq value t)))
-      (message "%s = %S" name value)
-      (setf (sgml-eltype-appdata eltype (intern (downcase name))) value)
-      (sgml-skip-ps))))
-
-
-(defun sgml-do-processing-instruction (in-declaration)
-  (let ((start (point)))
-    (when (and (or in-declaration
-                   sgml-psgml-pi-enable-outside-dtd)
-               (eq ?P (following-char))
-	       (looking-at "PSGML +\\(\\sw+\\) *"))
-      (let* ((command (format "%s" (downcase (match-string 1))))
-             (flag-command (assoc command
-                                  '(("nofill"      . nofill)
-                                    ("breakafter"  . break-after-stag)
-                                    ("breakbefore" . break-before-stag)
-                                    ("structure"   . structure)))))
-	(goto-char (match-end 0))
-	(cond (flag-command
-               (sgml-parse-set-appflag (cdr flag-command)))
-              ((equal command "element")
-               (sgml--pi-element-handler))
-              (t
-               (sgml-log-warning "Unknown processing instruction for PSGML: %s"
-                                 command)))))
-    (if sgml-xml-p
-	(sgml-skip-upto "XML-PIC")
-      (sgml-skip-upto "PIC"))
-    (when sgml-pi-function
-      (funcall sgml-pi-function
-	       (buffer-substring-no-properties start (point)))))
-  (if sgml-xml-p
-      (sgml-check-delim "XML-PIC")
-    (sgml-check-delim "PIC"))
-  (unless in-declaration
-    (sgml-set-markup-type 'pi))
-  t)
-
-;;;; Possible modification to allow setting face on content:
-(defun sgml-set-face-for (start end type)
-  (let ((face (cdr (assq type sgml-markup-faces))))
-    ;;++
-    (if (and (null type) sgml-current-tree) 
-        (setq face (sgml-element-appdata sgml-current-tree 'face)))
-    ;;--
-    (cond
-     (sgml-use-text-properties
-      (let ((inhibit-read-only t)
-	    (after-change-function nil)	; obsolete variable
-	    (before-change-function nil) ; obsolete variable
-	    (after-change-functions nil)
-	    (before-change-functions nil))
-	(put-text-property start end 'face face)
-        (when (< start end)
-          (put-text-property (1- end) end 'rear-nonsticky '(face)))))
-     (t
-      (let ((current (overlays-at start))
-	    (pos start)
-	    old-overlay)
-	(while current
-	  (cond ((and (null old-overlay)
-                      type
-		      (eq type (overlay-get (car current) 'sgml-type)))
-		 (setq old-overlay (car current)))
-		((overlay-get (car current) 'sgml-type)
-		 ;;(message "delov: %s" (overlay-get (car current) 'sgml-type))
-		 (delete-overlay (car current))))
-	  (setq current (cdr current)))
-	(while (< (setq pos (next-overlay-change pos))
-		  end)
-	  (setq current (overlays-at pos))
-	  (while current
-	    (when (overlay-get (car current) 'sgml-type)
-	      (delete-overlay (car current)))
-	    (setq current (cdr current))))
-	(cond (old-overlay
-	       (move-overlay old-overlay start end)
-	       (if (null (overlay-get old-overlay 'face))
-		   (overlay-put old-overlay 'face face)))
-	      (face
-	       (setq old-overlay (make-overlay start end))
-	       (overlay-put old-overlay 'sgml-type type)
-	       (overlay-put old-overlay 'face face))))))))
-
-;¤¤\end{codeseg}
+;\end{codeseg}
 (provide 'psgml-dtd)
 (require 'psgml)
 (require 'psgml-parse)
-
+(eval-when-compile (require 'cl))
 
 ;;;; Variables
 
 ;; Variables used during doctype parsing and loading
 (defvar sgml-used-pcdata nil
-  "True if model group built is mixed")
+  "True if model group built is mixed.")
 
 
 ;;;; Constructing basic
 ;;;; Optimization for the dfa building
 
 (defsubst sgml-empty-state-p (s)
-  ;; True if S hase no outgoing moves
+  "True if S has no outgoing moves."
   (and (sgml-normal-state-p s)
        (null (sgml-state-reqs s))
        (null (sgml-state-opts s)))  )
 
 (defun sgml-one-final-state (s)
-  ;; Collaps all states that have no moves
-  ;; This is a safe optimization, useful for (..|..|..)
+  "Collapse all states that have no moves.
+This is a safe optimization, useful for (..|..|..)."
   (sgml-debug "OPT one final: reqs %d opts %d"
 	      (length (sgml-state-reqs s))
 	      (length (sgml-state-opts s)))
 ;(sgml-make-conc (sgml-make-primitive-content-token 'para) (sgml-make-primitive-content-token 'list))
 ;(sgml-make-conc (sgml-make-& (list (sgml-make-primitive-content-token 'para) (sgml-make-primitive-content-token 'list))) (sgml-make-primitive-content-token 'foo))
 
-;(setq x  (sgml-some-states-of  (sgml-make-primitive-content-token 'para))) 
-;(sgml-state-final-p (car x) )