--- a/ide/bioperl-mode/site-lisp/bioperl-init.el
+++ b/ide/bioperl-mode/site-lisp/bioperl-init.el
@@ -223,7 +223,8 @@ come."
   :group 'bioperl
   ;; version check
   (if (string-match "\\(2[0-9]\\)\.[0-9]+\\(?:\.[0-9]+\\)?" (emacs-version))
-      (if (>= (string-to-number (match-string 1 (emacs-version))) 22)
+      (if (or (string-match "^XEmacs" (emacs-version))
+              (>= (string-to-number (match-string 1 (emacs-version))) 22))
 	  t
 	(error "Must upgrade to Emacs 22 to use bioperl-mode"))
     (error "Must upgrade to Emacs 22 to use bioperl-mode"))

---
 ide/bioperl-mode/site-lisp/bioperl-mode.el |   32 ++++++++++++++++++---------
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/ide/bioperl-mode/site-lisp/bioperl-mode.el b/ide/bioperl-mode/site-lisp/bioperl-mode.el
index 91e162a..4651646 100755
--- a/ide/bioperl-mode/site-lisp/bioperl-mode.el
+++ b/ide/bioperl-mode/site-lisp/bioperl-mode.el
@@ -227,7 +227,7 @@ N is an index associated with a component of `bioperl-module-path'."
      cr))
   (if (not method) (signal 'quit t))
   (let (
-	( cache-pos (if method (assoc-string method bioperl-method-pod-cache t) nil) )
+	( cache-pos (if method (bioperl-assoc-string method bioperl-method-pod-cache t) nil) )
 	)
     (if (not cache-pos)
 	(message "No such method")
@@ -657,7 +657,7 @@ Cache alist format:
 		  (if (member n (mapcar 'string-to-number (split-string (cdr cache-item) path-separator)))
 		      ;; deja vu
 		      (setq mod-alist-keys nil) ;; fall-through
-		    (setcdr cache-item (concat (cdr (assoc-string key mod-alist t)) path-separator (cdr cache-item)))
+		    (setcdr cache-item (concat (cdr (bioperl-assoc-string key mod-alist t)) path-separator (cdr cache-item)))
 		    (setq ret t))))
 	      ))
 
@@ -951,7 +951,7 @@ The module name for this method is assumed to be present in
 	  (insert "  " method)
 	  (insert "\n")
 	  (while (setq cur-tag (pop tags))
-	    (setq cur-content (cdr (assoc-string cur-tag content t)))
+	    (setq cur-content (cdr (bioperl-assoc-string cur-tag content t)))
 	    (setq cur-content (replace-regexp-in-string "!!$" "\n" cur-content))
 	    (setq cur-content (replace-regexp-in-string "!!" 
 							"\n             " cur-content))
@@ -1036,7 +1036,7 @@ if t, the reader barfs out whatever was finally entered."
 	(if (not name-list)
 	  (setq name-list (bioperl-module-names 
 			   nmspc nil t)))
-	(setq pthn (cdr (assoc-string mod name-list t)))
+	(setq pthn (cdr (bioperl-assoc-string mod name-list t)))
 	(if (not pthn) 
 	    (error "Shouldn't be here(1). Check `bioperl-module-path' and try running `bioperl-clear-module-cache'."))
 	(if (not (string-match path-separator pthn))
@@ -1067,7 +1067,7 @@ if t, the reader barfs out whatever was finally entered."
 			nil t (car (car module-path-list))))
 	    (if (string-equal pthn "")
 		(setq pthn (car (car module-path-list))))
-	    (setq pthn (elt (assoc-string pthn module-path-list t) 1))
+	    (setq pthn (elt (bioperl-assoc-string pthn module-path-list t) 1))
 	    )))
       ;; method completion
       (setq nmspc (replace-regexp-in-string "::$" "" nmspc))
@@ -1104,7 +1104,7 @@ if t, the reader barfs out whatever was finally entered."
 			nil t (car (car module-path-list))))
 	      (if (string-equal pthn "")
 		  (setq pthn (car (car module-path-list))))
-	      (setq pthn (elt (assoc-string pthn module-path-list t) 1))
+	      (setq pthn (elt (bioperl-assoc-string pthn module-path-list t) 1))
 	      )
 	    ))
 	(setq name-list (bioperl-method-names (concat nmspc "::" mod) nil pthn))
@@ -1228,6 +1228,16 @@ This function searches all paths specified in
   (setq bioperl-module-names-cache nil)
   (setq bioperl-module-names-cache '(("Bio"))))
 
+; XEmacs compability for assoc-string (from http://web.mit.edu/shutkin/MacData_1124b/afs/athena/contrib/xemacs/share/xemacs-packages/lisp/calendar/cal-compat.el):
+(if (fboundp 'assoc-string)
+    (defalias 'bioperl-assoc-string 'assoc-string)
+  (defun bioperl-assoc-string (key list case-fold)
+    (if case-fold
+        (assoc-ignore-case key list)
+      (assoc key list)))  
+  )
+
+
 ;;
 ;; utilities (out of bioperl- namespace)
 ;;
@@ -1235,25 +1245,25 @@ This function searches all paths specified in
     
 (defun assoc-all (key alist &optional ret)
   "Return list of *pointers* (like assoc) to all matching conses in the alist.
-Uses `assoc-string' for case control."
-  (let ( (c (assoc-string key alist t)) (r) ) 
+Uses `bioperl-assoc-string' for case control."
+  (let ( (c (bioperl-assoc-string key alist t)) (r) ) 
     (if c 
 	(assoc-all key (cdr alist) (if ret (add-to-list 'ret c t 'eq) (list c)))
       ret)))
 
 (defun deep-assoc (keys alist)
   "Return the associations of a set of keys in an alist tree.
-Uses `assoc-string' for case control."
+Uses `bioperl-assoc-string' for case control."
   (cond
    ((not keys) 
     nil)
    ((not (listp alist))
     nil)
    ((= (length keys) 1)
-    (assoc-string (pop keys) alist t))
+    (bioperl-assoc-string (pop keys) alist t))
    (t
     (let* ( (key (pop keys))
-	    (newlist (assoc-string key alist t)) ) 
+	    (newlist (bioperl-assoc-string key alist t)) ) 
       (if newlist
 	  (deep-assoc keys (cdr newlist))
 	(deep-assoc nil nil)))
-- 
1.6.0.4


Last problem I got to was add-to-list which doesn't exists in the 4
argument version in XEmacs, so I cheated a little and tried simply using
the 3 argument version although they aren't the same:

Subject: [PATCH] Use 3 argument call to add-to-list; XEmacs doesn't have the 4 arg version

I'm not sure that this is ok - eq is not the same as equal.
---
 ide/bioperl-mode/site-lisp/bioperl-mode.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ide/bioperl-mode/site-lisp/bioperl-mode.el b/ide/bioperl-mode/site-lisp/bioperl-mode.el
index 4651646..b1ca510 100755
--- a/ide/bioperl-mode/site-lisp/bioperl-mode.el
+++ b/ide/bioperl-mode/site-lisp/bioperl-mode.el
@@ -1248,7 +1248,8 @@ This function searches all paths specified in
 Uses `bioperl-assoc-string' for case control."
   (let ( (c (bioperl-assoc-string key alist t)) (r) ) 
     (if c 
-	(assoc-all key (cdr alist) (if ret (add-to-list 'ret c t 'eq) (list c)))
+;;	(assoc-all key (cdr alist) (if ret (add-to-list 'ret c t 'eq) (list c)))
+	(assoc-all key (cdr alist) (if ret (add-to-list 'ret c t) (list c)))
       ret)))
 
 (defun deep-assoc (keys alist)
-- 
1.6.0.4


Now I can bring up the pod of a module using C-c M-p - but only once.
Second attempt gives me 'Wrong type argument: listp, "SeqFeature"'.

If I run toggle-debug-on-error and C-c M-p again, I get:

  Debugger entered--Lisp error: (wrong-type-argument listp "SeqFeature")
    assoc-ignore-case("TypedSeqFeatureI" ("SeqFeature" ("Annotated" . "0") ("AnnotationAdaptor" . "0") ("Collection" . "0") ("CollectionI" . "0") ("Computation" . "0") ("FeaturePair" . "0") ("Gene") ("Generic" . "0") ("PositionProxy" . "0") ("Primer" . "0") ("SiRNA") ("Similarity" . "0") ("SimilarityPair" . "0") ("Tools") ("TypedSeqFeatureI" . "0")))
    (if case-fold (assoc-ignore-case key list) (assoc key list))
    bioperl-assoc-string("TypedSeqFeatureI" ("SeqFeature" ("Annotated" . "0") ("AnnotationAdaptor" . "0") ("Collection" . "0") ("CollectionI" . "0") ("Computation" . "0") ("FeaturePair" . "0") ("Gene") ("Generic" . "0") ("PositionProxy" . "0") ("Primer" . "0") ("SiRNA") ("Similarity" . "0") ("SimilarityPair" . "0") ("Tools") ("TypedSeqFeatureI" . "0")) t)
    (let ((c ...) (r)) (if c (assoc-all key ... ...) ret))
    assoc-all("TypedSeqFeatureI" ("SeqFeature" ("Annotated" . "0") ("AnnotationAdaptor" . "0") ("Collection" . "0") ("CollectionI" . "0") ("Computation" . "0") ("FeaturePair" . "0") ("Gene") ("Generic" . "0") ("PositionProxy" . "0") ("Primer" . "0") ("SiRNA") ("Similarity" . "0") ("SimilarityPair" . "0") ("Tools") ("TypedSeqFeatureI" . "0")))
    (setq alist (assoc-all key cache-pos))
    (while (setq key (pop mod-alist-keys)) (setq alist (assoc-all key cache-pos)) (setq cache-item (if ... ... ...)) (if (null cache-item) (if alist nil ...) (if ... ... ... ...)))
    (let* ((mod-alist ...) (mod-alist-keys ...) (cache-item) (key)) (while (setq key ...) (setq alist ...) (setq cache-item ...) (if ... ... ...)))
    (if (null (cdr cache-pos)) (progn (setcdr cache-pos ...) (setq ret t)) (let* (... ... ... ...) (while ... ... ... ...)))
    (if cache-pos (if (null ...) (progn ... ...) (let* ... ...)) (setq keys module-components) (while (let ... ... ...) (setq good-keys ...) (setq keys ...)) (push (pop good-keys) keys) (setq good-keys (nreverse good-keys)) (setq alist (deep-assoc-all good-keys bioperl-module-names-cache)) (setq cache-pos (if ... ... ...)) (setq module-string (pop good-keys)) (while good-keys (setq module-string ...)) (setq ret (bioperl-anastomose keys module-string cache-pos n)))
    (if (not pth) nil (setq cache-pos (cond ... ... ...)) (if cache-pos (if ... ... ...) (setq keys module-components) (while ... ... ...) (push ... keys) (setq good-keys ...) (setq alist ...) (setq cache-pos ...) (setq module-string ...) (while good-keys ...) (setq ret ...)))
    (let* ((pth ...) (module-components ...) (module-string) (modules) (alist) (cache ...) (cache-pos) (keys) (this-key) (good-keys) (ret)) (if (not pth) nil (setq cache-pos ...) (if cache-pos ... ... ... ... ... ... ... ... ... ...)) ret)
    bioperl-add-module-names-to-cache("Bio::SeqFeature" 0)
    (while (< i (length pths)) (bioperl-add-module-names-to-cache module-dir i) (setq i (1+ i)))
    (let* ((module-components ...) (unlist ...) (choose-dirs ...) (choose-mods ...) (ret) (i) (pths ...) (alists) (alist)) (setq i 0) (while (< i ...) (bioperl-add-module-names-to-cache module-dir i) (setq i ...)) (setq alists (deep-assoc-all module-components bioperl-module-names-cache)) (setq alist (if ... ... ...)) (if (and alist ...) (cond ... ... ...)) (if (not ret) nil (if ... ... ret)))
    bioperl-module-names("Bio::SeqFeature" nil t)
    (setq name-list (bioperl-module-names nmspc nil t))
    (if (not name-list) (setq name-list (bioperl-module-names nmspc nil t)))
    (if (or (not ...) (not done) no-retry) nil (if (not name-list) (setq name-list ...)) (setq pthn (cdr ...)) (if (not pthn) (error "Shouldn't be here(1). Check `bioperl-module-path' and try running `bioperl-clear-module-cache'.")) (if (not ...) (setq pthn ...) (let* ... ... ... ... ... ...)))
    (unless (or (not ...) (not done) no-retry) (if (not name-list) (setq name-list ...)) (setq pthn (cdr ...)) (if (not pthn) (error "Shouldn't be here(1). Check `bioperl-module-path' and try running `bioperl-clear-module-cache'.")) (if (not ...) (setq pthn ...) (let* ... ... ... ... ... ...)))
    (while (not done) (unless (and nmspc ...) (cond ... ...) (setq nmspc ...) (if ... t ... ...)) (if (or ... ...) (setq done t) (let nil ... ... ...)) (unless (or ... ... no-retry) (if ... ...) (setq pthn ...) (if ... ...) (if ... ... ...)) (setq nmspc (replace-regexp-in-string "::$" "" nmspc)) (unless (or ... ... ...) (if pthn t ... ...) (setq name-list ...) (let nil ... ...)))
    (let ((parsed ...) (nmspc) (mod) (mth) (pthn) (name-list) (done nil)) (if (not parsed) nil (setq nmspc ...) (setq mod ...)) (while (not done) (unless ... ... ... ...) (if ... ... ...) (unless ... ... ... ... ...) (setq nmspc ...) (unless ... ... ... ...)) (if get-method (list nmspc mod mth pthn) (list nmspc mod pthn)))
    bioperl-completing-read("Bio::SeqFeature::Generic" nil t "[pod] ")
    (let ((mod ...)) (if (not ...) (signal ... t)) (list (apply ... ... ...) (car ...)))
    call-interactively(bioperl-view-pod)


... and then I ran out of steam.

I hope you can use this for something - I was very happy to read that
you plan to support XEmacs :-)


  Best regards,

    Adam

-- 
____________________________________________________________ 
Best Regards
Adam Sjgren
Phone: +45 44460321
E-mail: adsj@novozymes.com

Novozymes A/S (reg. no.: 10007127)
Krogshoejvej 36
DK-2880 Bagsvaerd, Denmark

 
