(setq debug-on-error t)
(message "Loading Jayakrishnan's .emacs file")
frame(setq default-frame-alist
'((top . 5) (left . 350)
(width . 80) (height . 43)
(cursor-color . "red")
(cursor-type . box)
(foreground-color . "black")
(background-color . "white")
(vertical-scroll-bars . right)))
(setq load-path
(cons "d:/Applications/emacs-20.6/site-lisp/jde-2.1.5" load-path))
(setq load-path
(cons "d:/jk-personal/Emacs/lisp" load-path))
(setq load-path
(cons "d:/jk-personal/Emacs/lisp/w3-4.0pre.46" load-path))
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(display-time)
(require 'iswitchb)
(iswitchb-default-keybindings)
(setq frame-title-format "%f")
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
"Go to the matching parenthesis if on parenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(t (self-insert-command (or arg 1)))))
(autoload 'ispell-word "ispell"
"Check spelling of word at or before point" t)
(autoload 'ispell-complete-word "ispell"
"Complete word at or before point" t)
(autoload 'ispell-region "ispell"
"Check spelling of every word in the region" t)
(autoload 'ispell-buffer "ispell"
"Check spelling of every word in the buffer" t)
(autoload 'ispell "ispell" "Run ispell over buffer" t)
(autoload 'ispell-region "ispell" "Run ispell over region" t)
(autoload 'ispell-word "ispell" "Check word under cursor" t)
(define-key esc-map "$" 'ispell-word)
(setq ispell-command "c:/usr/local/bin/ispell.exe")
(setq ispell-look-dictionary "c:/Applications/Ispell/ispell.words")
(setq ispell-look-command "c:/usr/local/bin/look.exe")
(setenv "ISPELL_DICTIONARY" "c:/Applications/Ispell/ispell.dict")
(setenv "ISPELL_WORDS" "c:/Applications/Ispell/ispell.words")
(setq ispell-command-options (list "-d" "c:/Applications/Ispell/ispell.dict"))
(autoload 'folding-mode "folding" "Folding mode" t)
(custom-set-variables
'(paren-mode (quote paren) nil (paren))
'(browse-url-browser-function (quote browse-url-netscape))
'(toolbar-visible-p nil)
'(w3-package t)
'(gnus-package t))
(custom-set-faces)
(defcustom font-lock-mode-string ""
"The string that will appear in the modeline when font-lock-mode is on."
:type 'string
:group 'font-lock)
(defun which-function ()
"Return current function name based on point.
If `imenu--index-alist' does no exist, or is empty or if point
is located before first function, returns nil."
(and
(boundp 'imenu--index-alist)
imenu--index-alist
(let ((pair (car-safe imenu--index-alist))
(rest (cdr-safe imenu--index-alist))
(name nil))
(while (and (or rest pair)
(or (not (number-or-marker-p (cdr pair)))
(>= (point) (cdr pair))))
(setq name (car pair))
(setq pair (car-safe rest))
(setq rest (cdr-safe rest)))
name)))
(defun cii-which-func-mode-on ()
"Turn `which-func-modes' on, full scale."
(setq which-func-maxout 0 which-func-format '(" [" which-func-current "]")
which-func-mode-global t)
(require 'which-func)
(add-to-list 'which-func-modes 'cperl-mode)
(add-to-list 'which-func-modes 'java-mode)
(add-to-list 'which-func-modes 'jde-mode)
(which-func-mode 0)
(which-func-mode 1))
(cii-which-func-mode-on)
(setq gc-cons-threshold 750000) (setq truncate-partial-width-windows nil)
(setq window-min-height 3)
(setq completion-auto-help t) (setq completion-auto-exit t) (setq track-eol t)
(setq mouse-yank-at-point t)
(setq print-escape-newlines t)
(setq visible-bell t)
(setq inhibit-startup-message t)
(setq default-major-mode 'text-mode)
(setq garbage-collection-messages t)
(if (boundp 'transient-mark-mode)
(setq transient-mark-mode t))
(setq mark-even-if-inactive t)
(setq-default search-highlight t)
(copy-face 'highlight 'isearch)
(setq query-replace-highlight t)
(setq search-highlight t)
(require 'paren)
(column-number-mode t)
(put 'narrow-to-region 'disabled nil)
(put 'eval-expression 'disabled nil)
(setq default-tab-width 4)
(message "jpack loaded")
(require 'jde)
(require 'jdok)
(message "jdok loaded")
(load "javahelp")
(setq javahelp-directories '("d:/Reference/Java/jdk1.1.8/docs/api" "//d/Reference/Java/swing-1.1.1fcs/doc/api"))
(setq javahelp-database-file "c:/.javahelp")
(setq max-specpdl-size 50000)
(setq max-lisp-eval-depth 50000)
(setq compilation-error-regexp-alist
(cons (list "\\([^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2 3)
compilation-error-regexp-alist))
(defvar java-function-regexp
(concat
"^[ \t]*" "\\(public\\|private\\|protected\\|" "abstract\\|final\\|static\\|"
"synchronized\\|native"
"\\|[ \t\n\r]\\)*" "[a-zA-Z0-9_$]+" "[ \t\n\r]*[[]?[]]?" "[ \t\n\r]+" "\\([a-zA-Z0-9_$]+\\)" "[ \t\n\r]*" "(" "\\([ \t\n\r]*" "\\<[a-zA-Z0-9_$]+\\>" "[ \t\n\r]*[[]?[]]?" "[ \t\n\r]+" "\\<[a-zA-Z0-9_$]+\\>" "[ \t\n\r]*[[]?[]]?" "[ \t\n\r]*,?\\)*" "[ \t\n\r]*" ")" "[ \t\n\r]*" "\\(throws[^{;]+\\)?" "[;{]" )
"Matches method names in java code, select match 2")
(defvar java-class-regexp
"^[ \t\n\r]*\\(final\\|abstract\\|public\\|[ \t\n\r]\\)*class[ \t\n\r]+\\([a-zA-Z0-9_$]+\\)[^;{]*{"
"Matches class names in java code, select match 2")
(defvar java-interface-regexp
"^[ \t\n\r]*\\(abstract\\|public\\|[ \t\n\r]\\)*interface[ \t\n\r]+\\([a-zA-Z0-9_$]+\\)[^;]*;"
"Matches interface names in java code, select match 2")
(defvar java-imenu-regexp
(list (list nil java-function-regexp 2)
(list ".CLASSES." java-class-regexp 2)
(list ".INTERFACES." java-interface-regexp 2))
"Imenu expression for Java")
(add-hook 'java-mode-hook
(function (lambda ()
(setq imenu-generic-expression java-imenu-regexp))))
(global-set-key "\C-cf" 'imenu)
(global-set-key "\C-cg" 'goto-line)
(global-set-key "\C-cr" 'revert-buffer)
(global-set-key '[f1] 'javahelp-search-emacs-flavour)
(global-set-key '[f2] 'browse-url)
(load "jasmin")
(setq auto-mode-alist
(append
'(("\\.C$" . c++-mode)
("\\.j$" . jasmin-mode)
) auto-mode-alist))
(autoload 'auto-revert-mode "autorevert" nil t)
(autoload 'turn-on-auto-revert-mode "autorevert" nil nil)
(autoload 'global-auto-revert-mode "autorevert" nil t)
(global-auto-revert-mode 1)
(setq browse-url-netscape-program "c:/Program Files/Netscape/Communicator/Program/netscape.exe")
(defvar shell-execute-helper "d:/jk-personal/Emacs/bin/shelex.exe")
(defun shell-execute-url (url &optional new-window)
"Invoke the shell-execute-helper program to call ShellExecute and launch or
re-direct a web browser on the specified url."
(interactive "sURL: ")
(call-process shell-execute-helper nil nil nil url))
(setq browse-url-browser-function 'shell-execute-url)
(setq gnus-button-url 'shell-execute-url) (setq vm-url-browser 'shell-execute-url)
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
(fset 'yes-or-no-p 'y-or-n-p)
|