Torsten Geise writes: > Hi, > > any hints why my syntax highlighting is disabled in java buffers? > [snip] > > The contents of the *Messages* buffer were > > Loading cl-macs...done > "/home/geiset/emacs/cedet/cogre" added to `load-path' > "/home/geiset/emacs/cedet/ede" added to `load-path' > "/home/geiset/emacs/cedet/eieio" added to `load-path' > "/home/geiset/emacs/cedet/semantic" added to `load-path' > Loading /usr/lib/emacs/21.3/i386-linux/fns-21.3.1-x.el (source)...done > Loading advice...done > Loading senator... > Loading easymenu...done > Loading ring...done > Loading senator...done > Loading semantic-idle...done > Loading semanticdb...done > "/home/geiset/emacs/cedet/speedbar" added to `load-path' > "/home/geiset/emacs/cedet/contrib" added to `load-path' > Loading /home/geiset/emacs/cedet/common/cedet.el (source)...done > ECB 2.25 uses semantic 2.0beta2, eieio 0.18beta2 and speedbar 0.15beta2. > Loading derived...done > Loading mule-util...done > jde-java-font-lock: building names cache...empty > Loading cl-extra...done > Loading cl-seq...done > Loading ~/emacs/nxml-mode/rng-auto.el (source)...done > Loading semantic-el...done > For information about the GNU Project and its goals, type C-h C-p. > The ECB is now activated. > There are no incompatible or renamed options! > There are no NEWS to display. > Loading bookmark...done > Loading wisent-java-tags...done > Loading /home/geiset/projects/prj.el (source)...done > Loading /home/geiset/projects/ibs/actual/prj.el (source)...done > Loading /home/geiset/projects/prj.el (source)...done > Loading /home/geiset/projects/ibs/actual/prj.el (source)...done > my-jde-mode-hook: > Symbol's function definition is void: turn-on-setnu-mode
This error, which aborts jde-mode during loading of a Java file, might be the cause. I believe the JDEE used to load setnu.el by default. Anyway, it doesn't now. In fact, I've looked at the setnu support code and there's duplicate code. I need to do some cleanup. Meanwhile, you should be able to work around the problem by putting a (require 'setnu) form in your .emacs file. Paul > Loading semantic-edit...done > Loading semanticdb-file...done > Mark set > Loading semantic-tag-ls...done > Loading semantic-decorate...done [2 times] > Loading semantic-complete...done [3 times] > Loading jde-javadoc (source)... > Loading /home/geiset/projects/prj.el (source)...done > Loading /home/geiset/projects/ibs/actual/prj.el (source)...done > Loading jde-javadoc (source)...done [3 times] > Preparing problem report... > Loading sendmail...done > Formatting bug report > buffer................................................................................. > Mark set > > > > End Insert *Messages* buffer > > > > The contents of the .emacs file was > > > ;; Set the debug option to enable a backtrace when a > ;; problem occurs. > ;; (setq debug-on-error t) > > ; ---- language-env DON'T MODIFY THIS LINE! > ; $Id: emacs,v 1.4 1998/02/20 18:35:26 leutloff Exp leutloff $ > > ;;--- support european keys ------------------------------- > (set-input-mode (car (current-input-mode)) > (nth 1 (current-input-mode)) > 0) > ; `standard-display-european' is semi-obsolete and conflicts > ; with multibyte characters. `set-language-environment' is > ; a substitute. > ; (standard-display-european t) > > ; don't use non-ascii (i.e. german umlauts) as word delimiter > (if (>= emacs-major-version 20) > (set-language-environment "Latin-1") > (require 'iso-syntax)) > (require 'disp-table) > > ;;--- redefine some keys ---------------------------------- > ;(global-set-key [backspace] 'backward-delete-char-untabify) > ; the following line should not break delete char during incremental > ; search - has this other disadvantages? > (global-set-key "\177" 'backward-delete-char-untabify) > (global-set-key [delete] 'delete-char) > (global-set-key [home] 'beginning-of-line) > (global-set-key [end] 'end-of-line) > ;(global-set-key [C-home] 'beginning-of-buffer) > ;(global-set-key [C-end] 'end-of-buffer) > ; entries needed by XEmacs: > (global-set-key [(control home)] 'beginning-of-buffer) > (global-set-key [(control end)] 'end-of-buffer) > ;;--- Names for calendar command ------------------------- > (defvar calendar-day-name-array > ["Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam"]) > (defvar calendar-month-name-array > ["Januar" "Februar" "März" "April" "Mai" "Juni" > "Juli" "August" "September" "Oktober" "November" "Dezember"]) > ; ---- language-env end DON'T MODIFY THIS LINE! > > (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. > '(auto-compression-mode t nil (jka-compr)) > '(case-fold-search t) > '(column-number-mode t) > '(current-language-environment "Latin-1") > '(default-input-method "latin-1-prefix") > '(ecb-auto-activate t) > '(ecb-layout-name "leftright2") > '(ecb-layout-window-sizes (quote (("leftright2" (0.20725388601036268 . > 0.625) (0.20725388601036268 . 0.3194444444444444) (0.19689119170984457 . > 0.625) (0.19689119170984457 . 0.3194444444444444))))) > '(ecb-options-version "2.25") > '(ecb-source-path (quote (("/" "/") ("/home/geiset/projects" > "projects") ("/home/geiset/projects/ibs/actual" "ibs") > ("/home/geiset/projects/ibs/actual/webapp/src/java" "ibs-java") > ("/home/geiset/projects/ibs/actual/webapp/src/jsp" "ibs-jsp") > ("/home/geiset/projects/ibs/actual/webapp/src" "ibs-src") > ("/home/geiset/projects/ibs/actual/webapp/test" "ibs-test") > ("/home/geiset/projects/ibs/actual/webapp/conf" "ibs-conf")))) > '(ecb-tip-of-the-day nil) > '(ecb-windows-width 0.25) > '(fill-column 80) > '(global-auto-revert-mode t nil (autorevert)) > '(global-font-lock-mode t nil (font-lock)) > '(icomplete-mode t nil (icomplete)) > '(indent-tabs-mode nil) > '(jde-complete-function (quote jde-complete-minibuf)) > '(jde-gen-comments nil) > '(jde-import-auto-sort t) > '(jde-import-excluded-packages (quote ("^bsh\\..*" > "^java\\.lang\\.[^.]*$" "^sun\\..*" "^com\\.sun\\..*" > jde-import-exclude-current-package))) > '(jde-jdk-registry (quote (("1.3.1" . "/usr/lib/j2se/1.3")))) > '(jde-junit-testrunner-type "junit.textui.TestRunner") > '(mouse-wheel-mode t t) > '(show-paren-mode t nil (paren)) > '(show-paren-style (quote mixed)) > '(show-trailing-whitespace nil) > '(tab-width 4) > '(transient-mark-mode t) > '(vc-cvs-header (quote ("/* > * $Header$ > * > * IBS, Integriertes Bewerber System > * > * $Author$ > * $Revision$ > * $Date$ > * > * ==================================================================== > * @COPYRIGHT@ > * > * ==================================================================== > * $Log$ > * > * ==================================================================== > */ > "))) > '(visible-bell t)) > (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. > '(default ((t (:stipple nil :background "white" :foreground "#000000" > :inverse-video nil :box nil :strike-through nil :overline nil :underline > nil :slant normal :weight normal :height 90 :width normal :family > "adobe-family"))))) > > ;;--------------------------------------------------- > ;; eigene erweiterungen > ;; > > (setq user-mail-address "[EMAIL PROTECTED]") > (setq user-full-name "Torsten Geise") > > (add-to-list 'load-path (expand-file-name "~/emacs")) > > ;; turn on mouse wheel scrolling > (defun sd-mousewheel-scroll-up (event) > "Scroll window under mouse up by five lines." > (interactive "e") > (let ((current-window (selected-window))) > (unwind-protect > (progn > (select-window (posn-window (event-start event))) > (scroll-up 3)) > (select-window current-window)))) > (defun sd-mousewheel-scroll-down (event) > "Scroll window under mouse down by five lines." > (interactive "e") > (let ((current-window (selected-window))) > (unwind-protect > (progn > (select-window (posn-window (event-start event))) > (scroll-down 3)) > (select-window current-window)))) > > (global-set-key (kbd "<mouse-5>") 'sd-mousewheel-scroll-up) > (global-set-key (kbd "<mouse-4>") 'sd-mousewheel-scroll-down) > > ;; CUA > (require 'cua) > (CUA-mode t) > > ;; CEDET > ;; Configuration variables here: > (setq semantic-load-turn-useful-things-on t) > ;; Load CEDET > (load-file "~/emacs/cedet/common/cedet.el") > > ;; ECB > (add-to-list 'load-path (expand-file-name "~/emacs/cedet/ecb")) > (require 'ecb) > > ;; (add-to-list 'auto-mode-alist '("\\.jsp\\'" . html-helper-mode)) > > ;; keytables > (global-set-key (quote [f2]) (quote comment-region)) > (global-set-key (quote [S-f2]) (quote uncomment-region)) > (global-set-key (quote [f12]) (quote global-set-key)) > (global-set-key "" (quote goto-line)) > (global-set-key (quote [insert]) (quote delete-other-windows)) > (global-set-key (quote [C-tab]) (quote indent-region)) > (global-set-key (quote [f11]) (quote customize-variable)) > (global-set-key (quote [S-f7]) (quote jde-build)) > (global-set-key (quote [S-f8]) (quote jde-find-class-source)) > > (global-set-key "\261" (quote ecb-goto-window-directories)) > (global-set-key "\262" (quote ecb-goto-window-sources)) > (global-set-key "\263" (quote ecb-goto-window-methods)) > (global-set-key "\264" (quote ecb-goto-window-history)) > (global-set-key "\265" (quote ecb-goto-window-edit1)) > (global-set-key "\266" (quote ecb-goto-window-edit2)) > > (global-set-key "^B" (quote jde-build)) > > (set-frame-width (selected-frame) 193) > (set-frame-height (selected-frame) 72) > (set-frame-position (selected-frame) 0 0) > > (require 'generic-x) > (setq auto-mode-alist > (append'(("\\.properties\\'" . java-properties-generic-mode)) > auto-mode-alist)) > > ;; ----------------------------------------------- > ;; HTML-Helper-Mode hook to complete jsp-taglibs > ;; (defun pcomplete-jsp-setup() > ;; "Setup html-helper-mode to complete jsp taglibs" > > ;; (set (make-local-variable 'pcomplete-parse-arguments-function) > ;; 'pcomplete-parse-jsp-arguments) > ;; (set (make-local-variable 'pcomplete-command-completion-function) > ;; 'pcomplete/html-helper-mode/complete-command) > ;; (set (make-local-variable 'pcomplete-command-name-function) > ;; 'pcomplete-jsp-command-name) > ;; (set (make-local-variable 'pcomplete-default-completion-function) > ;; (lambda () (pcomplete-here (pcomplete-jsp-nicks)))) > ;; (set (make-local-variable 'pcomplete-suffix-list) '(? ?:)) > > ;; (message "pcomplete-jsp-setup function executed") > ;; ) > > ;; (add-hook 'html-helper-mode-hook 'pcomplete-jsp-setup) > > ;; (setq auto-mode-alist (cons '("\\.jsp$" . html-helper-mode) > auto-mode-alist)) > > ;; This .emacs file illustrates the minimul setup > ;; required to run the JDE. > > ;; Update the Emacs load-path to include the path to > ;; the JDE and its require packages. This code assumes > ;; that you have installed the packages in the emacs/site > ;; subdirectory of your home directory. > (add-to-list 'load-path (expand-file-name "~/emacs/cedet/jde/lisp")) > (add-to-list 'load-path (expand-file-name "~/emacs/cedet/semantic")) > (add-to-list 'load-path (expand-file-name "~/emacs/cedet/speedbar")) > (add-to-list 'load-path (expand-file-name "~/emacs/cedet/eieio")) > (add-to-list 'load-path (expand-file-name "~/emacs/cedet/elib")) > > > ;; 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)) > > > (defun my-jde-mode-hook () > (define-key c-mode-base-map "\C-m" 'newline-and-indent) > (define-key jde-mode-map "y" (quote jde-open-class-source)) > (define-key jde-mode-map (quote [f5]) (quote jde-bug-step-into)) > (define-key jde-mode-map (quote [S-f5]) (quote jde-bug-step-into-all)) > (define-key jde-mode-map (quote [f6]) (quote jde-bug-step-over)) > (define-key jde-mode-map (quote [f7]) (quote jde-bug-step-out)) > (define-key jde-mode-map (quote [f8]) (quote jde-bug-continue)) > (define-key jde-mode-map (quote [f9]) (quote > jde-bug-toggle-breakpoint)) > (require 'jde-junit) > ;; (define-key jde-mode-map "^U" (quote jde-junit-run)) > (global-set-key "" (quote jde-junit-run)) > (turn-on-setnu-mode) > (message "jde-hook function executed") > ) > > (add-hook 'jde-mode-hook 'my-jde-mode-hook) > > ;; Include the following only if you want to run > ;; bash as your shell. > > ;; Setup Emacs to run bash as its primary shell. > (setq shell-file-name "bash") > (setq shell-command-switch "-c") > (setq explicit-shell-file-name shell-file-name) > (setenv "SHELL" shell-file-name) > (setq explicit-sh-args '("-login" "-i")) > > ;; HTML-Helper-Mode > (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t) > (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) > auto-mode-alist)) > ;; (setq auto-mode-alist (cons '("\\.jsp$" . html-helper-mode) > auto-mode-alist)) > > ;; nxml-mode > (load "~/emacs/nxml-mode/rng-auto.el") > (setq auto-mode-alist (cons > '("\\.\\(xml\\|jsp\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode) > auto-mode-alist)) > > > > =====end inserted .emacs file