Paul Kinnucan wrote:
> Is there any reason for having both of these variables other than
> preserving existing prj.el files. The list variable seems to include the
> non-list variable. So why not just have a list of regexps for classes to
> exclude?
I did do this in the original posting. I had assumed that you omitted it for fear
of breaking existing existing prj.el files. Anyway, I thought it was odd since it
incorporated the other change I made for stripping packages.
Since my last post, I also put in a fix so that it strips out any imports that
don't contain a "." character in them (since these are imported by default
anyway).
Here is the diff from my version of jde-wiz.el and the JDE-2.1.9 version of
jde-wiz.el. (Let me know if you want the full file).
WOLFSDEN:.../elisp/jde-2.1.9/lisp> diff jde-wiz.el jde-wiz.el.orig
27,33d26
< ;; begin JVL enhancement contributed by Jim LoVerde <[EMAIL PROTECTED]>
< (defcustom jde-wiz-insert-excluded-packages-regexp-list '("bsh.*")
< "*Specifies classes that should not be imported into a source file.
< The value of this variable should be a regular expression. The
`jde-wiz-find-and-import' command does not import any classes whose fully
qualified names matchthe regular expression. If more than one fully qualified
class name matches theunqualified name that you specify, the command prompts you
to select only the classes that do not match the regular expression."
< :group 'jde-project
< :type '(repeat (string :tag "Command")))
< ;; end JVL enhancement contributed by Jim LoVerde <[EMAIL PROTECTED]>
50a44
>
222,234d215
<
< ;;; begin JVL commented out (replaced below)
< ;;;(defun jde-wiz-strip-excluded-imports (new-import)
< ;;; "Removes excluded imports from the list"
< ;;; ;;if the string matchs the regexp we want to ignore it.
< ;;; (if (string-match jde-wiz-insert-excluded-packages-regexp
< ;;; (concat " " new-import))
< ;;; (progn (message "Excluding import: %s" new-import)
< ;;; ())
< ;;; new-import))
< ;;; end JVL commented out
<
< ;;; begin JVL change to support a list of regexps
238,259c219,220
< (let ((temp-list (nconc (list jde-wiz-insert-excluded-packages-regexp)
< jde-wiz-insert-excluded-packages-regexp-list)))
< (if temp-list
< (let (i n result)
< (setq i 0)
< (setq n (length temp-list))
< (setq result new-import)
< (while (< i n)
< (let ((exclude-regexp (nth i temp-list)))
< (if (or (not (string-match "[.]" new-import))
< (string-match exclude-regexp new-import))
< (progn
< (message "Excluding import: %s" new-import)
< (setq result nil)))
< (setq i (+ i 1))))
< result)
< new-import)))
<
< (defun jde-wiz-strip-excluded-import (exclude-regexp new-import)
< "Removes excluded imports from the list"
< ;;if the string matchs the regexp we want to ignore it.
< (if (string-match exclude-regexp (concat " " new-import))
---
> (if (string-match jde-wiz-insert-excluded-packages-regexp
> (concat " " new-import))
263,264d223
< ;;; end JVL change to support a list of regexps
<
327,329c286
< ;; begin JVL Corrected to work if you have (setq pop-up-windows nil)
< (if pop-up-windows (delete-window))
< ;; end JVL Corrected to work if you have (setq pop-up-windows nil)
---
> (delete-window)
--
****************************************************
Jim LoVerde, Technical Architect
Strategic Technology Resources
http://www.str.com
voice 312.674.4798 fax 312.697.3801
mobile 773.398.9539 pager [EMAIL PROTECTED]
S/MIME Cryptographic Signature