(setq font-lock-maximum-decoration 3)
;(global-font-lock-mode)
(global-set-key "\C-c\C-l" 'goto-line)
(global-set-key "\C-c\C-r" 'copy-region-as-kill)
;;; Used for stig-paren
(setq load-path (cons "/u0/csgrad/pventura/.emacs_dir" load-path))

;;; Load JDE
;(setq load-path (cons "/util/gnu/share/emacs/site-lisp/jde-2.1.5" load-path))
(require 'jde)

(display-time)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Java stuff
(defun my-c-mode-common-hook ()
  ;; my customizations for all of c-mode, c++-mode, objc-mode, java-mode
  (c-toggle-hungry-state t)
  (c-set-offset 'substatement-open 0)
  (c-set-offset 'access-label 0)
  ;;(c-set-offset 'topmost-intro '+)
  (c-set-offset 'label 3)
  (setq-default c-basic-offset 3)
  (define-key c++-mode-map "\C-cc" 'c++-ub-compile-link)
  (setq comp-string-c nil)
  ;; other customizations can go here
  )

(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
(add-hook 'c-mode-common-hook 'turn-on-auto-fill)

(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'java-mode-hook 'my-java-hook)

(defun my-java-hook ()
  ;; customizations for Java mode
  (turn-on-auto-fill)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;parenthesis highlighting stuff
(defun stig-it nil
  "load stig paren"
  (interactive)
  (load-library "stig-1.22"))

(if (not (string-match "XEmacs" emacs-version))
    (load-library "stig-1.22"))

(if (not (string-match "XEmacs" emacs-version))
    (cond (window-system
	   (require 'stig-paren)
	   (global-set-key (quote [67108904])
	     (quote stig-paren-toggle-dingaling-mode))  ;;; Ctrl-(
	   (global-set-key (quote [67108905])
	     (quote stig-paren-toggle-sexp-mode))       ;;; Ctrl-)
	   (global-set-key (quote [4194352]) (quote stig-it))       ;;; ALT-0
	   (setq paren-dingaling-mode t)
	   (setq paren-sexp-mode t)
	   (setq paren-ding-unmatched t))
	  (t (setq blink-matching-paren t))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Fonts and colors
(copy-face 'default 'font-lock-comment-face)
(set-face-foreground 'font-lock-comment-face "MediumBlue")
(copy-face 'bold 'font-lock-function-name-face)
;(set-face-foreground 'font-lock-function-name-face "LightSkyBlue")
(set-face-foreground 'font-lock-function-name-face "BlueViolet")

(copy-face 'default 'font-lock-string-face)
;(set-face-foreground 'font-lock-string-face "DarkTurquoise")
(set-face-foreground 'font-lock-string-face "DarkGreen")
(copy-face 'bold 'font-lock-keyword-face)
(set-face-foreground 'font-lock-keyword-face "Salmon")

(cond ( (not (string-match "XEmacs" emacs-version))
	(set-background-color "White")
	(set-foreground-color "Black")
	(set-cursor-color "Red")))

(setq-default column-number-mode t)

;(set-default-font "10x12")

;;; Set JDE variables
(custom-set-variables
 '(jde-help-docsets (quote (("javadoc" "/usr/j2se/docs/api" nil))))
 '(jde-run-applet-viewer "appletviewer")
 '(jde-compile-option-debug (quote ("all" (t nil nil))))
 '(jde-compile-option-sourcepath (quote ("./" "../" "../..")))
 '(jde-compile-option-deprecation nil)
 '(jde-quote-classpath nil)
 '(jde-db-source-directories (quote ("." ".." "../..")))
 '(jde-appletviewer-option-vm-args (quote ("-classpath" "/projects/CSE115/Classlibs")))
 '(jde-jdk-doc-url "http://java.sun.com/j2se/1.3/docs/api/overview-summary.html")
 '(jde-db-debugger (quote ("jdb" "" . "Executable")))
 '(jde-global-classpath (quote ("./" "../" "/projects/CSE115/Classlibs")))
 '(jde-enable-abbrev-mode t))
(custom-set-faces)
