Dear Developers,
I found this annoying that if you got overlay.el loaded, the setnu.el
will use overlay-api instead of XEmacs specific extents-api... And do
cause a function defination void error.
to reproduce:
 1. (require 'overlay)
 2. start setnu-mode in some buffer
 3. insert a newline into the buffer
 4. error
BTW, Do you know why don't setnu.el use (featurep 'xemacs) instead of
#'foundp some-extend-related-thing? A way to backward-compatible?
Thanks,
FKtPp
ChangeLog addition:
2009-06-17  It's me FKtPp ;)  <m_pupil(a)yahoo.com.cn>
	* setnu.el (setnu-extent-at): re-order the #'cond -> #'foundp
	special form so that #'map-extents was detected first whether
	overlay.el loaded or not.
edit-utils[Packages] source patch:
Diff command:   cvs -q diff -u
Files affected: setnu.el
===================================================================
RCS
Index: setnu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/edit-utils/setnu.el,v
retrieving revision 1.3
diff -u -r1.3 setnu.el
--- setnu.el	2002/07/24 18:36:50	1.3
+++ setnu.el	2009/06/16 16:49:32
@@ -340,7 +340,15 @@
     (setnu-set-extent-property e 'evaporate nil)
     e ))
 
-(cond ((fboundp 'overlays-in) ;; expect to see this in 19.30
+(cond ((fboundp 'map-extents)
+	(defun setnu-extent-at (pos buf)
+	  "Finds the setnu extent at the position POS in the buffer BUF."
+	  (map-extents (function (lambda (e maparg)
+				   (if (setnu-extent-property e 'setnu)
+				       e
+				     nil)))
+		       buf pos pos)))
+      ((fboundp 'overlays-in) ;; expect to see this in 19.30
        (defun setnu-extent-at (pos buf)
 	 "Finds the setnu extent at the position POS in the buffer BUF."
 	 (catch 'done
@@ -382,14 +390,6 @@
 		     (throw 'done (car o-list)))
 		 (setq o-list (cdr o-list)))
 	       nil )))))
-       ((fboundp 'map-extents)
-	(defun setnu-extent-at (pos buf)
-	  "Finds the setnu extent at the position POS in the buffer BUF."
-	  (map-extents (function (lambda (e maparg)
-				   (if (setnu-extent-property e 'setnu)
-				       e
-				     nil)))
-		       buf pos pos)))
        (t (error "can't find overlays-in, overlays-at, or map-extents!")))
 
 (defun setnu-extent-at-create (pos buf)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches