 {jpw: 03/2005}"
   (interactive)
   (save-excursion
-    (let* ((posn-pair-stack (list (jpw-phpBB-tag-find-enclosing nil nil t)))
-         );;end var defs
+    (let* ((posn-pair-stack '())
+           (current-tag (jpw-phpBB-tag-find-enclosing nil nil t))
+           );;end var defs
+      (while (car current-tag)
+        (setq posn-pair-stack (append posn-pair-stack (list current-tag)))
+        (setq current-tag 
+              (jpw-phpBB-tag-find-enclosing (1- (caadr current-tag))
+                                            (1+ (cadadr current-tag))
+                                            t))
+        )
       (message "%S" posn-pair-stack)
       );;end let
     );;end excursion

  (let (last-start-tag
        last-end-tag
        the-tag) ;; end var defs
    (if (re-search-backward "\\[.+\\]" nil t)
        (if (looking-at "\\[/")
            (setq last-end-tag (point))
          ;;else
          (setq last-start-tag (point))

    ;; else:  scalar
    (goto-char pos)
    )
  (if (looking-at jpw-tag-full-startend-re)
      (match-string-no-properties 1)) 
  )

