Commits

Anonymous committed 41c8bea

Checkpoint

Comments (0)

Files changed (2)

   (unless (memq this-command
             '(isearch-abort abort-recursive-edit exit-minibuffer
               keyboard-quit mwheel-scroll down up next-line previous-line
-              backward-char forward-char))
+              backward-char forward-char beginning-of-buffer
+              ))
     (ding)))
 (setq ring-bell-function 'my-bell-function)
 
   ;; *Only* allow python - flymake ships with a bunch of shit turned on
   (setq flymake-allowed-file-name-masks
                '(("\\.py\\'" flymake-pyflakes-init))))
+
+(eval-after-load 'ruby-mode
+  '(progn
+     (require 'flymake)
+
+     ;; Invoke ruby with '-c' to get syntax checking
+     (defun flymake-ruby-init ()
+       (let* ((temp-file (flymake-init-create-temp-buffer-copy
+                          'flymake-create-temp-inplace))
+              (local-file (file-relative-name
+                           temp-file
+                           (file-name-directory buffer-file-name))))
+         (list "ruby" (list "-c" local-file))))
+
+     (push '(".+\\.rb$" flymake-ruby-init) flymake-allowed-file-name-masks)
+     (push '("Rakefile$" flymake-ruby-init) flymake-allowed-file-name-masks)
+
+     (push '("^\\(.*\\):\\([0-9]+\\): \\(.*\\)$" 1 2 nil 3)
+           flymake-err-line-patterns)
+
+     (add-hook 'ruby-mode-hook
+               (lambda ()
+                 (when (and buffer-file-name
+                            (file-writable-p
+                             (file-name-directory buffer-file-name))
+                            (file-writable-p buffer-file-name))
+                   (local-set-key (kbd "C-c d")
+                                  'flymake-display-err-menu-for-current-line)
+                   (flymake-mode t))))))
+
 (add-hook 'find-file-hook 'flymake-find-file-hook)
 (setq flymake-log-level 0)
 (setq flymake-gui-warnings-enabled nil)
 ;; haskell-mode-exts
 (add-to-list 'load-path "~/.emacs.d/haskell-mode-exts")
 (require 'haskell-align-imports)
+(add-hook 'haskell-mode-hook 'turn-on-font-lock)
+(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
+(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
+(eval-after-load "haskell-mode"
+  '(progn
+     (define-key haskell-mode-map (kbd "C-c h") 'haskell-hoogle)))
+
+;; Ruby
+(eval-after-load 'ruby-mode
+  '(progn
+     ;; work around possible elpa bug
+     (ignore-errors (require 'ruby-compilation))
+     (setq ruby-use-encoding-map nil)
+     ;;(add-hook 'ruby-mode-hook 'inf-ruby-keys)
+     (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent)
+     (define-key ruby-mode-map (kbd "C-M-h") 'backward-kill-word)
+     (define-key ruby-mode-map (kbd "C-c l") "lambda")))
+;; ri mode
+(setq ri-ruby-program "/usr/bin/ruby")
+(setq ri-ruby-script "~/emacs.d/ri-emacs/ri-emacs.rb")
+(autoload 'ri "~/.emacs.d/ri-emacs/ri-ruby.el" nil t)
+(global-set-key (kbd "C-h r") 'ri)
+;; Rakefile are ruby
+(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
+(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
+(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
 
 ;; Color themes
 (add-to-list 'load-path "~/.emacs.d/color-theme")
 ;; Cleanup old buffers
 (require 'midnight)
 
+;; Buffer menu +
+(require 'buff-menu+)
+
 ;; Keybindings
 (global-set-key (kbd "<C-tab>") 'bury-buffer)
 (custom-set-variables

.emacs.d/ac-comphist.dat

-((("return" .
+((("nil" .
+   [2 0 0])
+  ("setq" .
+   [2 0 0 0])
+  ("re" .
+   [2 0])
+  ("if" .
+   [1 0])
+  ("upload" .
+   [1 0 0 0 0 0])
+  ("blank?" .
    [1 0 0 0 0 0])
   ("Returns" .
    [1 0 0 0 0 0 1])
-  ("blank?" .
+  ("return" .
    [1 0 0 0 0 0])
-  ("upload" .
+  ("when" .
+   [1 0 0 0])
+  ("Trivantis" .
+   [0 0 0 1 0 0 0 0 0])
+  ("mode-line-inactive" .
+   [1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0])
+  (":box" .
+   [1 0 0 0])
+  (":color" .
    [1 0 0 0 0 0])
-  ("if" .
+  (":line-width" .
+   [0 0 0 0 0 0 1 0 0 0 0])
+  ("-1" .
    [1 0])
-  ("re" .
-   [2 0])
-  ("setq" .
+  (":style" .
+   [1 0 0 0 0 0])
+  ("debugger" .
+   [1 0 0 0 0 0 0 0])
+  ("settings" .
+   [6 0 0 0 0 0 0 0])
+  ("to_s" .
+   [4 0 0 0])
+  ("template" .
+   [1 0 0 0 0 0 0 0])
+  ("template_name" .
+   [1 0 0 0 0 0 0 0 0 0 0 0 0])
+  ("definition" .
+   [2 0 0 0 0 0 0 0 0 0])
+  ("attr_path" .
+   [1 0 0 0 0 0 0 0 0])
+  ("puts" .
    [1 0 0 0])))