Ryan Senior writes:
> Hello,
>
> I've been receiving the error below as I write my import statements in
> a java source file. For example, I will open a new file, type
>
> import j
>
> right after I type j, I receive the following in a Debug buffer
>
> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
> char-equal(nil 46)
> (if (char-equal (char-after ...) 46) (quote
> jde-java-font-lock-package-face) (quote font-lock-type-face))
> eval((if (char-equal (char-after ...) 46) (quote
> jde-java-font-lock-package-face) (quote font-lock-type-face)))
> font-lock-fontify-keywords-region(1 12 nil)
> font-lock-default-fontify-region(1 12 nil)
> font-lock-fontify-region(1 12)
> run-hook-with-args(font-lock-fontify-region 1 12)
> jit-lock-fontify-now(1 501)
> jit-lock-function(1)
>
I was able to reproduced the error. It seems to go away once
I enter a class declaration in the file. Apparently the
parse regular expressions don't like a buffer that contains
only import statements.
I'll try to find a fix ASAP.
Paul
>
> If I close the debug buffer and type another letter of the import
> statement, it will open back up with the same message. If I leave the
> debug buffer open, I can go ahead and finish typing the import
> statements, however I get no more syntax highlighting (for the rest of
> that line or any line after). If I kill the buffer and reopen the file
> the syntax highlighting comes back.
>
> Everything else seems to be working properly, not sure why this isn't.
> I'm also fairly new to Emacs and especially Lisp, so my Lisp debugging
> skills are still pretty bad.
>
> I'm using
>
> GNU Emacs 21.3.1
> JDE-2.3.3
> semantic-1.4.4
> elib-1.0
> eieio-0.17
>
>
> Below is my .emacs file
>
>
> Thanks for the help!
>
> Ryan
>
>
>
> -------.emacs--------------
>
> ;; turn on font-lock mode
> (global-font-lock-mode t)
>
> ;; enable visual feedback on selections
> (setq transient-mark-mode t)
>
> (setq debug-on-error t)
>
> (setq visible-bell 1)
>
>
> (add-to-list 'load-path (expand-file-name "~/emacs/site/jde/lisp"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site/semantic"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site/speedbar"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site/eieio"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site/elib"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site/erc"))
> (add-to-list 'load-path (expand-file-name "~/emacs/site"))
>
> (setq defer-loading-jde nil)
>
> (if defer-loading-jde
> (progn
> (autoload 'jde-mode "jde" "JDE mode." t)
> (setq auto-mode-alist
> (append
> '(("\\.java\\'" . jde-mode))
> auto-mode-alist)))
> (require 'jde))
>
> (require 'tabbar)
> (require 'erc)
> (require 'color-theme);
> (require 'ssh)
> (require 'ispell)
>
> (defun my-jde-mode-hook ()
> (setq c-basic-offset 4))
>
> (add-hook 'jde-mode-hook 'my-jde-mode-hook)
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom -- don't edit or cut/paste
> ;; Your init file should contain only one such instance.
> '(jde-compile-option-classpath (quote
> ("/usr/share/java/gnu-crypto.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnujaxp.jar:/usr/java/j2sdk1.4.2_03/jre/lib/rt.jar:.")))
> '(tabbar-mode t nil (tabbar))
> '(text-mode-hook (quote (flyspell-mode turn-on-auto-fill
> text-mode-hook-identify))))
>
> (setq ispell-program-name (if nil "ispell" "aspell"))
> (setq ispell-program-name "aspell")
>
>
>
>