Created
July 26, 2010 02:25
-
-
Save seungjin/490103 to your computer and use it in GitHub Desktop.
.emacs file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq load-path (append '("~/.emacs.d") load-path)) | |
;;'side line number' | |
(require 'linum) | |
(global-linum-mode) | |
;;;Clearing Shell Mode Output | |
;;http://www.emacswiki.org/emacs/ShellMode#toc11 | |
(defun clear-shell () | |
(interactive) | |
(let ((old-max comint-buffer-maximum-size)) | |
(setq comint-buffer-maximum-size 0) | |
(comint-truncate-buffer) | |
(setq comint-buffer-maximum-size old-max))) | |
;;;clojure-mode | |
(add-to-list 'load-path' "~/opt/lib/emacs-clojure/clojure-mode") | |
(require 'clojure-mode) | |
;;swank-clojure | |
;(add-to-list 'load-path "~/opt/lib/emacs-clojure/swank-clojure") | |
;(setq swank-clojure-jar-path "~/Applications/clojure-1.1.0/clojure.jar" | |
; seank-clojure-extra-classpath (list | |
; "~/opt/lib/emacs-clojure/swank-clojure" | |
; "~/Applications/clojure-contrib-1.1.0/clojure-contrib.jar")) | |
;(require 'swank-clojure-autoload) | |
;; slime | |
(eval-after-load "slime" | |
'(progn (slime-setup '(slime-repl)))) | |
(add-to-list 'load-path "~/opt/lib/emacs-clojure/slime") | |
(require 'slime) | |
(slime-setup) | |
;;;End of clojure-mode | |
;;COMMON LISP | |
;;http://www.franz.com/emacs/ | |
; Emacs-Lisp interface. | |
(push "~/Applications/AllegroCL/eli" load-path) | |
(load "fi-site-init.el") | |
; | |
(setq fi:common-lisp-image-name "~/Applications/AllegroCL/alisp.exe") | |
(setq fi:common-lisp-image-file "~/Applications/AllegroCL/alisp.dxl") | |
(setq fi:common-lisp-directory "~/Applications/AllegroCL") | |
;;END OF COMMON LISP SETTING | |
;;SLIME | |
;;http://www.franz.com/emacs/slime.lhtml | |
;; update this path to the correct location. | |
(add-to-list 'load-path "~/Applications/slime") | |
(require 'slime-autoloads) | |
(eval-after-load "slime" | |
'(progn | |
(add-to-list 'load-path "~/Applications/slime/contrib") | |
(slime-setup '(slime-fancy slime-banner)) | |
(setq slime-complete-symbol*-fancy t) | |
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol))) | |
;; Optionally, specify the Lisp program you are using. Default is "lisp" | |
;; If the Allegro directory is not in your PATH environment variable | |
;; this should be a fully qualified path. | |
;; choose one of the below based on Express or non-Express usage | |
(setq inferior-lisp-program "~/Applications/AllegroCL/alisp") | |
;;(setq inferior-lisp-program "allegro-express") | |
;;;; python development | |
;;;; http://jesselegg.com/archives/2010/02/25/emacs-python-programmers-part-1/ | |
;;; Electric Pairs | |
(add-hook 'python-mode-hook | |
(lambda () | |
(define-key python-mode-map "\"" 'electric-pair) | |
(define-key python-mode-map "\'" 'electric-pair) | |
(define-key python-mode-map "(" 'electric-pair) | |
(define-key python-mode-map "[" 'electric-pair) | |
(define-key python-mode-map "{" 'electric-pair))) | |
(defun electric-pair () | |
"Insert character pair without sournding spaces" | |
(interactive) | |
(let (parens-require-spaces) | |
(insert-pair))) | |
;;; bind RET to py-newline-and-indent | |
(add-hook 'python-mode-hook '(lambda () | |
(define-key python-mode-map "\C-m" 'newline-and-indent))) | |
(setq-default indent-tabs-mode nil) | |
(setq-default tab-width 4) | |
(setq-default py-indent-offset 4) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment