diff lisp/psgml/psgml-parse.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents ec9a17fef872
children 54cc21c15cbb
line wrap: on
line diff
--- a/lisp/psgml/psgml-parse.el	Mon Aug 13 09:00:04 2007 +0200
+++ b/lisp/psgml/psgml-parse.el	Mon Aug 13 09:02:59 2007 +0200
@@ -1,5 +1,5 @@
 ;;;; psgml-parse.el --- Parser for SGML-editing mode with parsing support
-;; $Id: psgml-parse.el,v 1.4 1997/03/09 02:37:46 steve Exp $
+;; $Id: psgml-parse.el,v 1.1.1.1 1996/12/18 22:43:36 steve Exp $
 
 ;; Copyright (C) 1994, 1995 Lennart Staflin
 
@@ -229,7 +229,7 @@
 Only valid after `sgml-parse-to'.")
 
 (defvar sgml-markup-start nil
-  "Start point of markup being parsed.")
+  "Start point of markup beeing parsed.")
 
 (defvar sgml-conref-flag nil
   "This variable is set by `sgml-parse-attribute-specification-list'
@@ -446,17 +446,6 @@
 
 ;;; 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)
@@ -513,6 +502,18 @@
               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))
@@ -1965,12 +1966,8 @@
 		       (or name "?")
 		       pubid 
 		       (sgml-extid-sysid 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)))
+    (or (if sgml-system-identifiers-are-preferred
+	    (sgml-lookup-sysid-as-file extid))
 	(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)
@@ -3643,7 +3640,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)
-  (setq sgml-current-tree sgml-top-tree)
+  ;;*** what is sgml-current-tree now?
   (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))