Fix error with jde-import-kill-extra-imports in Emacs 22. http://patch-tracking.debian.net/patch/series/view/jde/2.3.5.1-5/0008-lisp-jde-import.el-Fix-error-with-jde-import-kill-e.patch --- jde-2.3.5.1-orig/lisp/jde-import.el 2006-02-19 15:22:36.000000000 +0100 +++ jde-2.3.5.1/lisp/jde-import.el 2009-03-21 08:49:49.000000000 +0100 @@ -494,16 +494,18 @@ (name (semantic-tag-name import)) (classname (jde-import-get-classname name)) (case-fold-search nil) - (number-of-matches - (substring (count-matches - (concat "\\b" classname "\\b")) 0 2))) + (number-of-matches + (count-matches (concat "\\b" classname "\\b")))) + (when (stringp number-of-matches) + (setq number-of-matches + (string-to-number (substring number-of-matches 0 2)))) (if (or ;; If name is already listed in the set ;; of required imports... (member name required-imports) ;;or the class is not reference in the file ;;and is not an import of the whole package i.e. .* - (and (< (string-to-number number-of-matches) 2) + (and (< number-of-matches 2) (not (string= classname "*"))) ;; or imports a class in the current package... (and