Commits

Roma Sokolov committed 3935909

put ocaml addns to el-get callbacks

  • Participants
  • Parent commits f65addf

Comments (0)

Files changed (2)

File .emacs.d/load/elpackages_init.el

   :after (progn () (global-set-key (kbd "C-x p") 'piu))))
 
 (el-get-add
- (:name tuareg-mode))
+ (:name tuareg-mode
+  :after (progn ()
+                (setq ocaml-compiler "ocamlfind ocamlc")
+                (defun ocaml-open-interface ()
+                  (interactive)
+                  (let* ((filename (file-name-nondirectory buffer-file-name))
+                         (basename (file-name-sans-extension filename)))
+                    (cond
+                     ((string-match ".*\\.ml\$" filename)
+                      (ty:util-open-file basename ".mli" "No Interface Found!"))
+                     ((string-match ".*\\.mli\$" filename)
+                      (ty:util-open-file basename ".ml" "No Implementation Found!"))
+                     )))
+                (global-set-key (kbd "C-c i") 'ocaml-open-interface)
+                (add-hook
+                 'tuareg-mode-hook
+                 (lambda () 'ocaml-set-compile-command)))))
 
 (el-get-add
  (:name lua-mode))
 (el-get-add
  (:name db-sql))
 
-;; (el-get-add
-;;  (:name hs-mode))
+(el-get-add
+ (:name haskell-mode))
 
 (el-get-add
  (:name ruby-suite

File .emacs.d/load/modes_init.el

 (eval-after-load "dired"
   '(define-key dired-mode-map (kbd "C-,") (fun-for-bind bs--show-with-configuration "dired")))
 
-
-;; I hate blinking
-(if (fboundp 'blink-cursor-mode)
-  (blink-cursor-mode -1))
-
-;; It's rare, but annoying
-(if (fboundp 'global-semantic-stickyfunc-mode)
-    (global-semantic-stickyfunc-mode -1))
-
-;; hello IDO, you are very nice
-(ido-mode 1)
-(setq
- ido-enable-flex-matching t
- ido-show-dot-for-dired t
- ido-auto-merge-work-directories-length -1 ; disable auto-merging
- ido-confirm-unique-completion t)
-
-(winner-mode 1) ;; window configuration undo/redo
-
-(require 'uniquify)
-(setq uniquify-buffer-name-style 'post-forward)
-
-
+;; whitespaces
 (require 'whitespace)
 (setq whitespace-style '(face trailing tabs lines-tail))
 (setq whitespace-line-column 80)
 
 (add-hook 'write-file-hooks 'delete-trailing-whitespace)
 
+
+;; I hate blinking
+(if (fboundp 'blink-cursor-mode)
+  (blink-cursor-mode -1))
+
+;; It's rare, but annoying
+(if (fboundp 'global-semantic-stickyfunc-mode)
+    (global-semantic-stickyfunc-mode -1))
+
+;; hello IDO, you are very nice
+(ido-mode 1)
+(setq
+ ido-enable-flex-matching t
+ ido-show-dot-for-dired t
+ ido-auto-merge-work-directories-length -1 ; disable auto-merging
+ ido-confirm-unique-completion t)
+
+(winner-mode 1) ;; window configuration undo/redo
+
+(require 'uniquify)
+(setq uniquify-buffer-name-style 'post-forward)
+
+
 (setq auto-mode-alist
       (append
        (list
         '("\\.sql\\'" . sql-mode)
         '("\\.plsql\\'" . sql-mode)
         '("\\.nu\\'" . lisp-mode)
+        '("\\.m\\'" . objc-mode)
         )
         auto-mode-alist))
 
   '(progn
      (define-key js-mode-map (kbd "RET") 'newline-maybe-indent)))
 
-;; ocaml
-
-(eval-after-load "ocaml"
-  '(progn
-     (
-      (setq ocaml-compiler "ocamlfind ocamlc")
-
-     (defun ocaml-open-interface ()
-       (interactive)
-       (let* ((filename (file-name-nondirectory buffer-file-name))
-              (basename (file-name-sans-extension filename)))
-         (cond
-          ((string-match ".*\\.ml\$" filename)
-           (ty:util-open-file basename ".mli" "No Interface Found!"))
-          ((string-match ".*\\.mli\$" filename)
-           (ty:util-open-file basename ".ml" "No Implementation Found!"))
-          )))
-
-     (add-hook
-      'tuareg-mode-hook
-      (lambda ()
-        'ocaml-set-compile-command
-        (global-set-key (kbd "C-c i") 'ocaml-open-interface))))))
 
 ;; ObjC