Looks like this is not XEmacs specific.
andy
-----Original Message-----
From: Andy Cooper [mailto:andy.cooperï¼ APPIQ.com]
Sent: Friday, May 02, 2003 11:06 AM
To: jde(a)sunsite.dk
Subject: JDEE font lock not working - possible semantic token list
problem?
I'm using emacs 21.2.1 (i386-msvc-nt5.1.2600)
I've just upgraded from JDEE 2.2.8 -> JDEE 2.3.2. I've got EIEIO 0.17,
speedbar 0.14 beta 4, semantic 1.4.4 and elib 1.0.
When viewing Java files, syntax hilighting doesn't work. If I switch to
Java mode, it
does work. I've got overlay-fix.el (not that I need it because I'm using
emacs > v20),
but that makes no difference (which I suspected).
semantic/senator is also showing some signs of oddity.
My .emacs file is below.
Any ideas on what I'm doing wrong?
---------------------------
;;;
;;; Add load paths
;;;
(add-to-list 'load-path "c:/emacs-21.2/eieio")
(add-to-list 'load-path "c:/emacs-21.2/lisp/elib-1.0")
(add-to-list 'load-path "c:/emacs-21.2/semantic")
(add-to-list 'load-path "c:/emacs-21.2/jde/lisp")
(add-to-list 'load-path "c:/emacs-21.2/speedbar")
;; Set font on Win2K to be Courier New 9 point.
(set-default-font "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1")
;;
;; EIEIO, semantic, JDEE
;;
(setq semantic-load-turn-everything-on t)
(setq debug-on-error t)
(require 'font-lock)
(require 'semantic-load)
(require 'jde)
;;;;
;;; Set global variables
;;;;
;;;(setq font-lock-support-mode 'fast-lock-mode)
(setq c-recognize-knr-p nil)
;; font-lock mode
(global-font-lock-mode 1)
(show-paren-mode 1)
;;; Turn on the transient mark
(transient-mark-mode 1)
(setq default-tab-width 4)
;; make the region face stand out better
;(invert-face 'region)
;;; Turn off default auto-saving to prevent auto-saving things like
INBOX
(setq auto-save-default nil)
;;; Add auto-fill mode to java-mode
(setq jde-mode-hook
'(lambda ()
(auto-fill-mode 1)
(set-fill-column 80)
;; (c-toggle-auto-hungry-state 1)
(c-toggle-auto-state 1)
;; uncomment for untabify
;;(untabify 0 (point-max))
))
;;; Add auto-fill mode to text-mode
(setq text-mode-hook
'(lambda ()
(auto-fill-mode 1)
(set-fill-column 80)
))
;;; Auto-save files after 2000 keystrokes.
(setq auto-save-interval 2000)
;;; Don't ask about saving buffers not associated with files.
(setq-default buffer-offer-save nil)
;;; Add a suffix character when doing command interpreter completion.
This
;;; adds a space after full filenames and a slash after subdirectories.
(setq comint-completion-addsuffix t)
;;; Don't list completions automatically in shell commands. This
setting
;;; provides the same behavior as usual Emacs minibuffer completion.
(setq comint-completion-autolist nil)
;;; Don't include duplicates in the history of shell commands.
(setq comint-input-ignoredups t)
;;; Don't ignore case when doing searches.
;;; (setq default-case-fold-search nil)
;;; Fill lines to 80 columns by default.
(setq default-fill-column 80)
;;; Put buffers in indented-text-mode by default.
(setq default-major-mode 'indented-text-mode)
(setq delete-old-versions t)
;;; Include the -w flag.
(setq diff-switches "-wc")
;;; Don't do garbage collection as frequently -- 19.27 seems to do this
;;; much more slowly.
(setq gc-cons-threshold 200000)
(setq truncate-partial-width-windows nil)
(setq vc-rcs-status nil)
(setq auto-mode-alist
(append '(("\\.pl$" . perl-mode)
("\\.pm$" . perl-mode)
("\\.perl$" . perl-mode)
("\\.F$" . fortran-mode)
("\\.f$" . fortran-mode)
("\\.sql$" . sql-mode)
("\\.java$" . jde-mode)
("\\.\\(m[me]\\|[1-9]\\)$" 'nroff-mode)
) auto-mode-alist))
(autoload 'perldb "perldb" "nil" t)
(autoload 'perl-mode "perl-mode" t)
;================================================================
;
; C/C++ stuff
;
;================================================================
(setq c-argdecl-indent 2)
(setq c-indent-level 2)
(setq c-continued-statement-offset 2)
(setq c-label-offset -2)
(setq c-brace-offset -2)
(setq c++-argdecl-indent 4)
(setq c++-indent-level 4)
(setq c++-continued-statement-offset 4)
(setq c++-label-offset -4)
(setq c++-brace-offset -4)
(setq
c-cleanup-list '(brace-else-brace
brace-elseif-brace
brace-catch-brace
;; defun-close-semi
list-close-comma
scope-operator
compact-empty-funcall)
c-hanging-braces-alist '(
(brace-list-open)
(brace-entry-open)
(substatement-open after)
(block-close . c-snug-do-while)
(extern-lang-open after)
(inexpr-class-open after)
(inexpr-class-close before))
)
(defun c++-mode-hook-stuff ()
(make-local-variable 'compile-command)
(make-local-variable 'case-fold-search)
(local-set-key "
" 'reindent-then-newline-and-indent)
(local-set-key "\M-/" 'dabbrev-expand)
(setq c-electric-pound-behavior '(alignleft))
(local-set-key "#" 'c-electric-pound)
(auto-fill-mode 1)
(set-fill-column 80)
(font-lock-mode 1)
(modify-syntax-entry 95 "w") ; 95 is underscore
(set-variable 'case-fold-search nil)
(setq comment-start "/* ")
(setq comment-end " */")
(setq comment-multi-line t)
(setq c-label-offset -1)
(setq c-brace-offset -2)
(set-variable 'exact-defun-prompt-regexp "^\\w.*[:\(\{]")
)
;;; as a convenience, map other-frame like lemacs does to other screens
(define-key global-map "\M-o" 'other-frame)
;(define-key global-map "\M->" 'forward-sexp)
;(define-key global-map "\M-<" 'backward-sexp)
(define-key global-map [M-f35] 'forward-sexp)
(define-key global-map [M-f33] 'backward-sexp)
;;; top row of function keys
(define-key global-map [f1] 'split-window-vertically)
(define-key global-map [f2] 'delete-other-windows)
(define-key global-map [f3] 'delete-frame)
(define-key global-map [f4] 'find-file-other-frame)
(define-key global-map [f5] 'find-file)
(define-key global-map [f6] 'find-file-other-window)
(define-key global-map [f7] 'save-then-kill-current-buffer-fkey)
(define-key global-map [f8] 'kill-current-buffer-fkey)
(define-key global-map [f9] 'one-screen)
(define-key global-map [f10] 'make-frame)
;;; right side keypad
;;; (define-key global-map [f21] 'what-cursor-position) ; Pause
(define-key global-map [f21] 'kill-rectangle)
(define-key global-map [f22] 'what-line) ; PrSc
(define-key global-map [f23] 'count-lines-page) ; Scroll
(define-key global-map [f24] 'yank-rectangle)
(define-key global-map [f25] 'fill-c-comment-block) ;
(define-key global-map [f26] 'indent-region) ; *
(define-key global-map [f27] 'beginning-of-buffer) ; home
;;;(define-key global-map [f28] 'previous-line) ; 8,^
(define-key global-map [f29] 'scroll-down) ; 9
;;;(define-key global-map [f30] 'backward-char) ; 4,<
(define-key global-map [f31] 'goto-line) ; 5
;;;(define-key global-map [f32] 'forward-char) ; 6,>
(define-key global-map [f33] 'end-of-buffer) ; 1
;;;(define-key global-map [f34] 'next-line) ; 2,v
(define-key global-map [f35] 'scroll-up) ; 3
(define-key global-map [insert] 'overwrite-mode) ; Ins
;;; Left side (Comment is actual keyboard symbol.)
(define-key global-map [help] 'revert-buffer) ; Help
(define-key global-map [f11] 'undo) ; Stop
(define-key global-map [f12] 'repeat-complex-command) ; Again
(define-key global-map [f13] 'query-replace-regexp) ; Props
(define-key global-map [f14] 'undo) ; Undo
;;;(define-key global-map [f15] 'delete-other-windows) ; Front
(define-key global-map [f16] 'copy-region-as-kill) ; Copy
(define-key global-map [f17] 'delete-blank-lines) ; Open
;;;(define-key global-map [f18] 'yank) ; Paste
(define-key global-map [f19] 'query-replace) ; Find
(define-key global-map [f20] 'bob-newline) ; Cut
(define-key global-map "\C-xg" 'goto-line)
(define-key global-map [drag-M-S-mouse-1] 'mouse-scroll)
;(defun make-face-bold-safe (f)
; (condition-case nil
; (make-face-bold f)
; (error nil)))
;
;(defun make-face-italic-safe (f)
; (condition-case nil
; (make-face-italic f)
; (error nil)))
;
;
;(progn
; (set-face-foreground 'font-lock-comment-face "red")
; (set-face-foreground 'font-lock-function-name-face "maroon4")
; (make-face-bold-safe 'font-lock-string-face)
; (make-face-bold-safe 'font-lock-doc-string-face)
; (make-face-bold-safe 'font-lock-keyword-face)
; (make-face-bold-safe 'font-lock-function-name-face)
;(make-face-italic-safe 'font-lock-comment-face)
; (set-face-foreground 'font-lock-keyword-face "#0000b0")
; (set-face-background 'modeline "blue")
; (set-face-foreground 'modeline "green")
; (set-face-foreground 'default "#103000")
; (set-face-foreground 'isearch "black")
; (set-face-background 'isearch "gold3")
; )
(load "vc")
(load "vc-hooks")
(load-library "p4")
(p4-set-p4-executable "c:\\program files\\perforce\\p4.exe")
(p4-set-my-clients '(acooper andyc))
;;
;; Add in hooks for setting client name so that we can set
;; other needed environment variables.
;;
(setq p4-set-client-hooks
'(lambda ()
(if (equal p4-new-client-name "andyc")
(progn
(setenv "SRC" "c:\\work\\src")
(setenv "MYP4DIR" "c:\\work")))
(if (equal p4-new-client-name "acooper")
(progn
(setenv "SRC" "c:\\devo\\src")
(setenv "MYP4DIR" "c:\\devo")))
)
)
;;
;; Disable these because we want the perforce integration
;;
(define-key global-map [?\C-x ?\C-q] 'toggle-read-only)
(define-key global-map [?\C-x ?v ?q] 'vc-toggle-read-only)
(define-key global-map [?\C-c ?\C-v ?\C-v] 'jde-make)
;;
;; Set some default environment variables for perforce
;;
(setenv "MYP4DIR" "c:\\devo")
(setenv "P4CLIENT" "acooper")
(setenv "P4PORT" "perforce01:1666");
`<
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste
it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(global-font-lock-mode t nil (font-lock))
'(global-senator-minor-mode nil nil (senator))
'(jde-ant-buildfile "build.xml")
'(jde-ant-enable-find t)
'(jde-build-function (quote (jde-ant-build)))
'(jde-compile-option-classpath (quote ("$SRC\\lib\\jdom.jar"
"$SRC\\lib\\classes12.jar" "$SRC\\lib\\snmp4_10.jar"
"$JBOSS_DIST\\lib\\ext\\log4j.jar" "$SRC\\lib\\web\\jloox20.jar"
"$JBOSS_DIST\\lib\\*.jar" "c:\\j2sdkee1.3.1\\lib\\j2ee.jar"
"$SRC\\lib\\web\\velocity-dep-1.3.jar" "$SRC\\lib\\JREngine.jar"
"$JBOSS_DIST\\lib\\concurrent.jar" "$JBOSS_DIST\\lib\\crimson.jar"
"$JBOSS_DIST\\lib\\getopt.jar" "$JBOSS_DIST\\lib\\gnu-regexp.jar"
"$JBOSS_DIST\\lib\\jaxp.jar" "$JBOSS_DIST\\lib\\jboss-common.jar"
"$JBOSS_DIST\\lib\\jboss-jmx.jar"
"$JBOSS_DIST\\lib\\jboss-system.jar"
"$JBOSS_DIST\\lib\\log4j-boot.jar" "$JBOSS_DIST\\lib\\tools.jar"
"$JBOSS_DIST\\lib\\jboss-boot.jar")))
'(jde-compile-option-command-line-args "-source 1.4")
'(jde-compile-option-depend nil)
'(jde-compile-option-depend-switch (quote ("-depend")))
'(jde-compile-option-directory "$MYP4DIR\\build-debug\\AppIQMgr")
'(jde-compile-option-extdirs (quote
("$JAVA_HOME\\jre\\lib\\etc;$JBOSS_DIST\\lib;$JBOSS_DIST\\server\\appiq\
\lib;$SRC\\..\\build-debug\\AppIQMgr\\lib;$SRC\\..\\build-debug\\AppIQAP
I\\lib;$SRC\\..\\build-debug\\AppIQCLI\\lib;$SRC\\..\\build-debug\\AppIQ
GUI\\lib;$SRC\\..\\build-debug\\AppIQPM\\lib")))
'(jde-compile-option-sourcepath (quote ("$SRC")))
'(jde-cygwin-path-converter (quote
(jde-cygwin-path-converter-internal)))
'(jde-db-source-directories (quote ("$SRC")))
'(jde-gen-buffer-boilerplate (quote ("/*" " * Copyright (c) 2002,
AppIQ, Inc. All Rights Reserved." " */")))
'(jde-gen-class-buffer-template (quote ("(funcall
jde-gen-boilerplate-function)" "(jde-gen-get-package-statement)"
"'>'n"
"\"public class \"" "(file-name-sans-extension
(file-name-nondirectory
buffer-file-name))" "\" \" (jde-gen-get-extend-class)"
"'>'n"
"\"{\"'>'n" "\"public \""
"(file-name-sans-extension
(file-name-nondirectory buffer-file-name))" "\" ()\""
"'>'n" "\"{\"'>'n"
"'>'p'n" "\"}\">"
"'>'n" "(jde-gen-get-interface-implementation)"
"'>'n"
"\"}\">" "\"// \""
"(file-name-sans-extension (file-name-nondirectory
buffer-file-name))" "'>'n")))
'(jde-gen-comments nil)
'(jde-gen-console-buffer-template (quote ("(funcall
jde-gen-boilerplate-function)" "(jde-gen-get-package-statement)"
"'>'n"
"\"public class \"" "(file-name-sans-extension
(file-name-nondirectory
buffer-file-name))" "(if jde-gen-k&r " "()"
"'>'n)" "\"{\"'>'n"
"\"public \"" "(file-name-sans-extension
(file-name-nondirectory
buffer-file-name))" "\" ()\"" "'>'n"
"\"{\"'>'n" "'>'n"
"\"}\"'>'n"
"'>'n" "\"public static void main(String[]
args)\"" "'>'n" "\"{\"'>'n"
"'>'p'n" "\"}\"'>'n"
"\"}\"")))
'(jde-gen-get-set-var-template (quote ("(end-of-line) '&"
"(P
\"Variable type: \" type) \" \"" "(P \"Variable name:
\" name) \";\"
'>'n '>'n" "'>'\"public \" (s
type)" "(if (string= \"boolean\"
(jde-gen-lookup-named 'type) ) " "\" is\" " "\"
get\" ) "
"(jde-gen-init-cap (jde-gen-lookup-named 'name))" "\"()
\"" "'>'n"
"\"{\" '>'n" "\"return \" (s name)
\";\" '>'n \"}\"" "'>'n
'>'n"
"'>'\"public void set\" (jde-gen-init-cap (jde-gen-lookup-named
'name))"
"\"(\" (s type) \" v) \" " "'>'n"
"\"{\" '>'n" "'>'\"this.\" (s
name)
\" = v;\" '>'n \"}\" '>'n'>")))
'(jde-gen-inner-class-template (quote ("(end-of-line) '& \"class
\" (P
\"Class name: \" class)" "\" \"
(jde-gen-get-extend-class)" "'>'n"
"\"{\" '>'n" "\"public \" (s class)
\"() \"" "'>'n"
"\"{\"'>'n"
"\"}\"'>'n" "'>'n"
"(jde-gen-get-interface-implementation)" "'>'n"
"\"}\" '>'n'>")))
'(jde-gen-to-string-method-template (quote ("(end-of-line) '&"
"\"public String toString() \"" "'>'n"
"\"{\"'>'n"
"\"}\"'>'n'>")))
'(jde-global-classpath (quote ("$SRC\\..\\build-debug")))
'(jde-make-args "-buildfile %SRC%\\build.xml -emacs")
'(jde-make-program "ant")
'(jde-make-working-directory "$SRC")
'(jde-read-make-args t)
'(jde-run-java-vm-w "javaw")
'(jde-run-option-classpath (quote ("$SRC\\..\\build-debug\\AppIQMgr"
"$JBOSS_DIST\\client\\connector.jar"
"$JBOSS_DIST\\client\\deploy.jar"
"$JBOSS_DIST\\client\\jaas.jar"
"$JBOSS_DIST\\client\\jboss-client.jar"
"$JBOSS_DIST\\client\\jboss-j2ee.jar"
"$JBOSS_DIST\\client\\jbosssx-client.jar"
"$JBOSS_DIST\\client\\jndi.jar"
"$JBOSS_DIST\\client\\jnp-client.jar"
"c:\\Oracle\\ora92\\jdbc\\lib\\classes12.jar"
"$JBOSS_DIST\\client\\jbossmq-client.jar"
"$JBOSS_DIST\\client\\log4j.jar" "$JBOSS_DIST\\lib\\ext\\jboss.jar"
"$JBOSS_DIST\\client\\jboss-common-client.jar"
"$JBOSS_DIST\\server\\appiq\\lib\\jdom.jar")))
'(jde-run-option-properties (quote (("java.security.auth.login.config"
. "c:\\jboss-3.0.4\\client\\auth.conf"))))
'(jde-wiz-get-set-variable-prefix "")
'(jde-wiz-include-javadoc nil)
'(jde-wiz-show-report t)
'(show-paren-mode t nil (paren))
'(transient-mark-mode t)
'(uniquify-buffer-name-style nil nil (uniquify)))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)
----------------------------