[:digit:]

Jerry James james at xemacs.org
Mon Apr 28 15:44:23 EDT 2008


I was just running a Java debug session with JDE.  When I stepped past
line 999, the line numbers started showing up with commas in them
(e.g., "line 1,200").  The function jde-jdb-string-to-int in
jde-jdb.el is supposed to strip those commas out.  It didn't, and as a
result I was stuck looking at line 1.  I had to apply the patch below
to make my debug session usable.  Do we not support the use of
[:digit:]?

Index: xemacs-packages/jde/lisp/jde-jdb.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/jde/lisp/jde-jdb.el,v
retrieving revision 1.6
diff -u -r1.6 jde-jdb.el
--- xemacs-packages/jde/lisp/jde-jdb.el	26 Nov 2007 15:16:47 -0000	1.6
+++ xemacs-packages/jde/lisp/jde-jdb.el	28 Apr 2008 19:37:29 -0000
@@ -353,7 +353,7 @@
     (if (string-match
 	 (concat "^  \\["
 		 (oref debuggee :stack-depth)
-		 "\\] .*(\\([^\$\n]*\\).*:\\([0-9]*[^[:digit:]]?[0-9]+\\))")
+		 "\\] .*(\\([^\$\n]*\\).*:\\([0-9]*[^0-9]?[0-9]+\\))")
 	 output)
 	(let ((marker (match-string 0 output))
 	      (class (match-string 1 output))
@@ -1869,7 +1869,7 @@
 (defun jde-jdb-string-to-int(number)
   "This method removes punctuation from a string, e.g, 1,200 (1.200 in Danish),
 and converts the result to an integer."
-  (if (string-match "[^[:digit:]]" number)
+  (if (string-match "[^0-9]" number)
       (setq number (replace-match "" nil nil number)))
   (string-to-int number))


-- 
Jerry James
http://loganjerry.googlepages.com/



More information about the XEmacs-Beta mailing list