Created
December 7, 2012 19:10
-
-
Save dcorking/4235635 to your computer and use it in GitHub Desktop.
Some personalizations to GNU Emacs 23
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
(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. | |
'(desktop-save-mode t) | |
'(inferior-lisp-program "sbcl") | |
'(printer-name "Laserjet-3-office") | |
'(ps-font-family (quote Courier)) | |
'(ps-font-size 10.0) | |
'(python-python-command "python") | |
'(version-control t)) | |
(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. | |
'(default ((t (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 87 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))) | |
;;; This was installed by package-install.el. | |
;;; This provides support for the package system and | |
;;; interfacing with ELPA, the package archive. | |
;;; Move this code earlier if you want to reference | |
;;; packages in your .emacs. | |
(when | |
(load | |
(expand-file-name "~/.emacs.d/elpa/package.el")) | |
(package-initialize)) | |
;;; Typing of the Emacs game | |
(load-file "~/.emacs.d/local-libraries/typing.elc") | |
; directory to put various el files into | |
; (add-to-list 'load-path "/usr/share/emacs/includes") | |
(global-font-lock-mode 1) | |
(setq font-lock-maximum-decoration t) | |
; loads ruby mode when a .rb file is opened. | |
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t) | |
(setq auto-mode-alist (cons '(".rb$" . ruby-mode) auto-mode-alist)) | |
(setq auto-mode-alist (cons '(".rhtml$" . html-mode) auto-mode-alist)) | |
(add-hook 'ruby-mode-hook | |
(lambda() | |
(add-hook 'local-write-file-hooks | |
'(lambda() | |
(save-excursion | |
(untabify (point-min) (point-max)) | |
(delete-trailing-whitespace) | |
))) | |
(set (make-local-variable 'indent-tabs-mode) 'nil) | |
(set (make-local-variable 'tab-width) 2) | |
(imenu-add-to-menubar "IMENU") | |
(define-key ruby-mode-map "\C-m" 'newline-and-indent) | |
(require 'ruby-electric) | |
(ruby-electric-mode t) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wonder why this version of .emacs won't enable the compile command for Ruby. I get this message every time I open a Ruby file: