Paul Kinnucan writes:
 > Perhaps there is an obsolete version of semantic in your load-path. Perhaps
 > the obsolete version that started shipping with recent releases of XEmacs.

I believe I've traced the problem to the use of the function
semantic-overlay-get in the file semantic-util.el in semantic 1.3.2.
The XEmacs compatability code in semantic.el defines
semantic-overlay-get as a alias of extent-get.  When
semantic-overlay-get is used in semantic-util.el (in the
semantic-find-nonterminal-by-overlay function), the returned value is
treated as a list.  extent-get, according to its documentation,
doesn't return a list, it returns a single extent.  This is the cause
of the error which is reported by XEmacs.

I patched semantic-util.el in the following way.  I've tried to
preserve the original code, but just fix the case where list
operations are applied to extents.  I'm sure that there is a more
elegant (or correct, even) way to do this.

--- semantic-util.el.orig       Sat Nov 18 09:18:37 2000
+++ semantic-util.el    Thu Dec 21 10:28:59 2000
@@ -196,10 +196,11 @@
     (let ((ol (semantic-overlays-at (or positionormarker (point))))
          (ret nil))
       (while ol
-       (let ((tmp (semantic-overlay-get (car ol) 'semantic)))
+       (let ((tmp (semantic-overlay-get (if (listp ol) (car ol) ol) 'semantic)))
          (when tmp
            (setq ret (cons tmp ret))))
-       (setq ol (cdr ol)))
+       (setq ol (if (listp ol) (cdr ol) nil))
+       )
       (sort ret (lambda (a b) (< (semantic-token-start a)
                                 (semantic-token-start b)))))))

-- 
John Straw                                            [EMAIL PROTECTED]


Reply via email to