Question:  When using JDE on windows i have no problem with java syntax 
highlighting when emacs is in jde-mode.  However, on Red Hat Linux 7.1, 
when I load a java file I lose all syntax highlighting when emacs is in 
jde-mode.  If I switch to java-mode, i get my syntax highlighting but 
then I lose my JDE environment.  Does anyone know how to correct this?

BTW, paths to all JDE and lisp package are correct.

my .emacs file is pasted inline below....

-----------------------------------------

;; Red Hat Linux default .emacs initialization file

;; Are we running XEmacs or Emacs?
(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))

;; load path for jde
(add-to-list 'load-path (expand-file-name 
"/usr/share/emacs/20.7/jde-2.2.7.1/lisp"))
(add-to-list 'load-path (expand-file-name 
"/usr/share/emacs/20.7/lisp/eieio-0.16"))
(add-to-list 'load-path (expand-file-name 
"/usr/share/emacs/20.7/lisp/elib-1.0"))
(add-to-list 'load-path (expand-file-name 
"/usr/share/emacs/20.7/lisp/semantic-1.4beta5"))
(add-to-list 'load-path (expand-file-name 
"/usr/share/emacs/20.7/lisp/speedbar-0.13a"))

;; If you want Emacs to defer loading the JDE until you open a
;; Java file, edit the following line
;;(setq defer-loading-jde nil)
;; to read:
;;
(setq defer-loading-jde t)
;;

(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))


;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
 (setq c-basic-offset 2))

(add-hook 'jde-mode-hook 'my-jde-mode-hook)



;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)

;; Turn on font-lock mode for Emacs
(cond ((not running-xemacs)
   (global-font-lock-mode t)
))

;; Always end a file with a newline
(setq require-final-newline t)

;; Stop at the end of the file, not just add lines
(setq next-line-add-newlines nil)

(set-background-color "Black")
(set-foreground-color "White" )
(set-cursor-color "Yellow")

;; Enable wheelmouse support by default
(require 'mwheel)
(custom-set-variables
'(display-time-day-and-date t)
'(transient-mark-mode t)
'(display-time-mode t nil (time))
'(c-basic-offset 2)
'(column-number-mode t))
(custom-set-faces
'(default ((t (:foreground "white" :background "black"))))
'(font-lock-comment-face ((t (:foreground "green"))))
'(font-lock-string-face ((t (:foreground "yellow"))))
'(font-lock-keyword-face ((t (:foreground "blue"))))
'(font-lock-constant-face ((t (:foreground "lightgoldenrod"))))
'(font-lock-type-face ((t (:foreground "lightgrey"))))
'(modeline ((t (:foreground "black" :background "lightsteelblue"))))
'(highlight ((t (:foreground "black" :background "cyan"))))
'(font-lock-variable-name-face ((t (:foreground "LightGoldenrod"))))
'(font-lock-function-name-face ((t (:foreground "LightSteelBlue"))))
'(font-lock-builtin-face ((t (:foreground "blue")))))

Reply via email to