On 12 Nov 2002, [EMAIL PROTECTED] wrote:
> I put the following in my .emacs and nothing else.
> 
>     (add-to-list 'load-path "~/") (add-to-list 'load-path
>     "c:/emacs/site-lisp/packages/jde-2.2.9beta12/lisp") (add-to-list
>     'load-path "c:/emacs/site-lisp/packages/eieio-0.17beta4")
>     (add-to-list 'load-path
>     "c:/emacs/site-lisp/packages/semantic-1.4beta14") (add-to-list
>     'load-path "c:/emacs/site-lisp/packages/speedbar-0.14beta4")
>     (add-to-list 'load-path "c:/emacs/site-lisp/packages/elib-1.0")
> 
>     (require 'jde)
>     (jde-abbrev-mode)
> 
> 
> After Emacs loaded (and I didn't even open a .java file), I did, M-x
> list-abbrevs and got a bunch of jde abbrevs for both my fundamental
> mode and elisp modes as well.
> 
> Can somebody else try this out, with your correct load paths of
> course.

Okay,

The problem lies in the function jde-init-abbrev-table, when it is
called by the (jde-abbrev-mode) line.

    (defun jde-init-abbrev-table ()
      "Load the abbrev table.
    Load it with a set of abbrevs that invoke an anonymous function that
    does the expansion only if point is not in a quoted string or a
    comment."

      ;; Note the use of lexical-let - must have the common lisp packages
      ;; around, since the anonymous function needs the closure provided by
      ;; lexical-let.
      (interactive)
      ;; (setq local-abbrev-table (make-abbrev-table))
      (mapc 
       (lambda (x)
         (lexical-let
             ((abbrev (car x))          ; this is the abbrev, lexically scoped
              (expansion (cdr x)))              ; this is the expansion
           (define-abbrev 
             local-abbrev-table
             abbrev
             ""
             (lambda ()
               (if (jde-parse-comment-or-quoted-p)
                   (insert abbrev)              ; insert the abbrev in quote/comment
                 (insert expansion)))       ; proceed with expansion elsewhere
             0)))
       jde-mode-abbreviations)

      (if jde-gen-cflow-enable
          (jde-gen-load-abbrev-templates))

      (setq abbrevs-changed nil))

The line containing "(setq local-abbrev-table (make-abbrev-table))" was
commented out (I downloaded 2.2.9 and the same commented section is
there).  I uncommented and retried my previously mentioned .emacs and
nothing was set in the lisp-interaction-mode-abbrev-table on Emacs
start.  I haven't yet run Emacs fully with this line uncommented, but
maybe it was commented inadvertently and nobody caught it?

Anyways, I will recompile jde.el with this line uncommented and see how
things go.  I'm still going to be digging through elisp to understand
the ramifications of the line as well.
-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.

Reply via email to