diff lisp/psgml/psgml-api.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 131b0175ea99
line wrap: on
line diff
--- a/lisp/psgml/psgml-api.el	Mon Aug 13 08:45:53 2007 +0200
+++ b/lisp/psgml/psgml-api.el	Mon Aug 13 08:46:35 2007 +0200
@@ -1,5 +1,5 @@
 ;;; psgml-api.el --- Extra API functions for PSGML
-;; $Id: psgml-api.el,v 1.1.1.1 1996/12/18 03:35:18 steve Exp $
+;; $Id: psgml-api.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $
 
 ;; Copyright (C) 1994 Lennart Staflin
 
@@ -70,18 +70,20 @@
   (sgml-pop-all-entities)
   (sgml-need-dtd)
   (sgml-element-end element)		; Make sure all content is parsed
-  (save-excursion
-    (sgml-set-parse-state element 'start)
-    (when (eobp) (sgml-pop-entity))
-    (when (eolp) (forward-char 1))
-    (sgml-parse-data (point-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 (point-max) data-fun pi-fun entity-fun)
-	(setq c (sgml-tree-next c)))))
+  (let ((main-buffer-max (point-max)))
+    (save-excursion
+      (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))
 
 (defun sgml-parse-data (sgml-goal sgml-data-function sgml-pi-function