~:: kalyan ::~

.emacs


(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(canlock-password "4db7a62453020887e12d223e272ec7f9143fb4bd")
'(delete-selection-mode nil)
'(diff-jump-to-old-file nil)
'(icicle-reminder-prompt-flag 0)
'(inhibit-startup-screen t)
'(scroll-bar-mode (quote right))
'(show-paren-mode t)
'(transient-mark-mode t)
'(x-select-enable-clipboard t))

(transient-mark-mode 1)

(server-start)  ; Starts server for (among others) emacsclient

(add-to-list 'load-path "~/.emacs.d/color-theme-6.6.0/")
(require 'color-theme)
(color-theme-initialize)

(setq my-color-themes (list 'color-theme-emacs-21
'color-theme-arjen 'color-theme-bharadwaj-slate
'color-theme-billw 'color-theme-blue-mood
'color-theme-blue-sea 'color-theme-calm-forest
'color-theme-charcoal-black 'color-theme-clarity
'color-theme-classic 'color-theme-comidia
'color-theme-dark-blue 'color-theme-dark-blue2
'color-theme-dark-erc 'color-theme-dark-laptop
'color-theme-deep-blue 'color-theme-digital-ofs1
'color-theme-emacs-nw 'color-theme-euphoria
'color-theme-feng-shui 'color-theme-fischmeister
'color-theme-gnome 'color-theme-gnome2
'color-theme-goldenrod 'color-theme-gray1
'color-theme-gray30 'color-theme-greiner
'color-theme-hober 'color-theme-infodoc
'color-theme-lawrence 'color-theme-ld-dark
'color-theme-montz 'color-theme-oswald
'color-theme-pok-wob 'color-theme-tty-dark
'color-theme-xp))

(defun my-theme-set-default ()        ; Set the first row
(interactive)
(setq theme-current my-color-themes)
(funcall (car theme-current)))

(defun my-describe-theme ()        ; Show the current theme
(interactive)
(message "%s" (car theme-current)))

(defun my-theme-cycle ()
(interactive)
(setq theme-current (cdr theme-current))
(if (null theme-current)
(setq theme-current my-color-themes))
(funcall (car theme-current))
(message "%S" (car theme-current)))

(setq theme-current my-color-themes)
(setq color-theme-is-global nil)    ; Initialization
(my-theme-set-default)
(global-set-key [f7] 'my-theme-cycle)
(global-set-key [f3] 'goto-line)

;(set-default-font "9x15")
;(set-frame-size (selected-frame) 80 46)
;(set-frame-position (selected-frame) 0 18)

;; (setq default-frame-alist
;;       '((background-mode . light)
;;         (right-fringe . 0)
;;         (left-fringe)
;;         (font .
;; "-xos4-terminus-medium-r-normal--14-140-*-*-*-*-*-*")
;;         (border-color . "black")
;;         (tool-bar-lines . 1)
;;         (menu-bar-lines . 1)
;; ;        (background-color . "AntiqueWhite2")
;;         (nil)))

(load "~/.emacs.d/dired+.el")
(toggle-dired-find-file-reuse-dir 1)

(load "~/.emacs.d/epr.el")

(add-to-list 'load-path "~/.emacs.d/icicles/")

(load "~/.emacs.d/cparen.el")
(load "~/.emacs.d/highlight-regexp.el")
(load "~/.emacs.d/ibs.el")

(require 'w3m-load)
(require 'mime-w3m)

;(global-set-key [f5] 'ebrowse-tree-mode)
;(add-to-list 'auto-mode-alist '("BROWSE\\.*" . ebrowse-tree-mode))

;(add-to-list 'load-path "~/.emacs.d/emms/")
;(require 'emms-setup)
;(emms-standard)
;(emms-default-players)

; shift+left shift+right to move the focus the frames
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))

(load "~/.emacs.d/.ercrc.el")

;; (defun foo (&optional arg) (interactive "P")
;;   (let (kill-line arg) (interprogram-cut-function arg)))
;; (global-set-key "\C-k" 'foo)

(setq-default fill-column 80)

(load "~/.emacs.d/google.el")
(require 'google)

(load "~/.emacs.d/twit.el")
(require 'twit)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

(add-to-list 'load-path "~/.emacs.d/python-mode-1.0/")
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))

(fset 'yes-or-no-p 'y-or-n-p) ; allow 'y' for 'yes'

(defun my-javadoc-return ()
"Advanced C-m for Javadoc multiline comments.

Inserts `*' at the beggining of the new line if
unless return was pressed outside the comment"
(interactive)

(setq last (point))

(setq is-inside
(if (search-backward "*/" nil t)
;; there are some comment endings - search forward
(if (search-forward "/*" last t)
't
'nil)

;; it's the only comment - search backward
(goto-char last)
(if (search-backward "/*" nil t)
't
'nil
)
)
)

;; go to last char position
(goto-char last)

;; the point is inside some comment, insert `*'
(if is-inside
(progn
(insert "\n*")
(indent-for-tab-command))

;; else insert only new-line
(insert "\n"))

)

(add-hook 'c++-mode-hook (lambda ()
(local-set-key "\r" 'my-javadoc-return)
))

1 Comment »

  1. It would be nice to have a screenshot…

    Comment by stfu — February 10, 2011 @ 10:28 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: