Mercurial > hg > xemacs-beta
diff lisp/psgml/psgml-parse.el @ 12:bcdc7deadc19 r19-15b7
Import from CVS: tag r19-15b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:48:16 +0200 |
parents | ac2d302a0011 |
children | 9ee227acff29 |
line wrap: on
line diff
--- a/lisp/psgml/psgml-parse.el Mon Aug 13 08:47:56 2007 +0200 +++ b/lisp/psgml/psgml-parse.el Mon Aug 13 08:48:16 2007 +0200 @@ -1,5 +1,5 @@ ;;;; psgml-parse.el --- Parser for SGML-editing mode with parsing support -;; $Id: psgml-parse.el,v 1.1.1.2 1996/12/18 03:47:15 steve Exp $ +;; $Id: psgml-parse.el,v 1.2 1997/01/04 21:20:07 steve Exp $ ;; Copyright (C) 1994, 1995 Lennart Staflin @@ -446,6 +446,17 @@ ;;; Using states +(defsubst sgml-final (state) + (if (sgml-normal-state-p state) + (sgml-state-final-p state) + (sgml-final-and state))) + +(defun sgml-final-and (state) + (and (sgml-final (sgml-and-state-substate state)) + (loop for s in (sgml-and-state-dfas state) + always (sgml-state-final-p s)) + (sgml-state-final-p (sgml-and-state-next state)))) + ;; get-move: State x Token --> State|nil (defsubst sgml-get-move (state token) @@ -502,18 +513,6 @@ nconc (sgml-tokens-of-moves (sgml-state-reqs s))) (sgml-tokens-of-moves (sgml-state-reqs (sgml-and-state-next state)))))) - -(defsubst sgml-final (state) - (if (sgml-normal-state-p state) - (sgml-state-final-p state) - (sgml-final-and state))) - -(defun sgml-final-and (state) - (and (sgml-final (sgml-and-state-substate state)) - (loop for s in (sgml-and-state-dfas state) - always (sgml-state-final-p s)) - (sgml-state-final-p (sgml-and-state-next state)))) - (defun sgml-optional-tokens (state) (if (sgml-normal-state-p state) (sgml-tokens-of-moves (sgml-state-opts state)) @@ -1966,8 +1965,12 @@ (or name "?") pubid (sgml-extid-sysid extid)) - (or (if sgml-system-identifiers-are-preferred - (sgml-lookup-sysid-as-file extid)) + (or (if (and sgml-system-identifiers-are-preferred + (sgml-extid-sysid extid)) + (or (sgml-lookup-sysid-as-file extid) + (sgml-path-lookup ;Try the path also, but only using sysid + (sgml-make-extid nil (sgml-extid-sysid extid)) + nil nil))) (sgml-catalog-lookup sgml-current-localcat pubid type name) (sgml-catalog-lookup sgml-catalog-files pubid type name) (if (not sgml-system-identifiers-are-preferred) @@ -3640,7 +3643,7 @@ (setq sgml-dtd-info (sgml-pstate-dtd sgml-buffer-parse-state) sgml-top-tree (sgml-pstate-top-tree sgml-buffer-parse-state)) (sgml-set-global) - ;;*** what is sgml-current-tree now? + (setq sgml-current-tree sgml-top-tree) (while (stringp (cadr modifier)) ; Loop thru the context elements (let ((et (sgml-lookup-eltype (car modifier)))) (sgml-open-element et nil (point-min) (point-min))