cleaned up hooks a bit
This commit is contained in:
parent
4bc0350c47
commit
6d3d16fa39
7 changed files with 15 additions and 10 deletions
|
@ -32,13 +32,13 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(defun prelude-c-coding-hook ()
|
||||
(defun prelude-c-mode-common-hook ()
|
||||
(setq c-basic-offset 4)
|
||||
(prelude-coding-hook))
|
||||
|
||||
;; this will affect all modes derived from cc-mode, like
|
||||
;; java-mode, php-mode, etc
|
||||
(add-hook 'c-mode-common-hook 'prelude-c-coding-hook)
|
||||
(add-hook 'c-mode-common-hook 'prelude-c-mode-common-hook)
|
||||
|
||||
(provide 'prelude-c)
|
||||
|
||||
|
|
|
@ -39,7 +39,10 @@
|
|||
;; 2. Invoke M-x clojure-jack-in from a project
|
||||
(require 'clojure-mode)
|
||||
|
||||
(add-hook 'clojure-mode-hook 'prelude-lisp-coding-hook)
|
||||
(defun prelude-clojure-mode-hook ()
|
||||
(prelude-list-coding-hook))
|
||||
|
||||
(add-hook 'clojure-mode-hook 'prelude-clojure-mode-hook)
|
||||
|
||||
(provide 'prelude-clojure)
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
(add-hook 'text-mode-hook 'turn-on-auto-fill)
|
||||
|
||||
;; load yasnippet
|
||||
(require 'yasnippet) ;; not yasnippet-bundle
|
||||
(require 'yasnippet)
|
||||
(yas/initialize)
|
||||
|
||||
;; keep the whitespace decent all the time
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(defun prelude-haskell-hook ()
|
||||
(defun prelude-haskell-mode-hook ()
|
||||
(prelude-coding-hook)
|
||||
(turn-on-haskell-doc-mode)
|
||||
(turn-on-haskell-indentation))
|
||||
|
||||
(add-hook 'haskell-mode-hook 'prelude-haskell-hook)
|
||||
(add-hook 'haskell-mode-hook 'prelude-haskell-mode-hook)
|
||||
|
||||
(provide 'prelude-haskell)
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(defun prelude-js-coding-hook ()
|
||||
(defun prelude-js-mode-hook ()
|
||||
(prelude-coding-hook)
|
||||
;; electric-layout-mode doesn't play nice with js-mode
|
||||
(electric-layout-mode -1))
|
||||
|
||||
(add-hook 'js-mode-hook 'prelude-js-coding-hook)
|
||||
(add-hook 'js-mode-hook 'prelude-js-mode-hook)
|
||||
|
||||
(provide 'prelude-js)
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
(defalias 'perl-mode 'cperl-mode)
|
||||
|
||||
(defun prelude-cperl-mode-hook ()
|
||||
(prelude-coding-hook)
|
||||
(setq cperl-indent-level 4)
|
||||
(setq cperl-continued-statement-offset 8)
|
||||
;; cperl-hairy affects all those variables, but I prefer
|
||||
|
|
|
@ -35,10 +35,11 @@
|
|||
|
||||
(require 'python)
|
||||
|
||||
(defun prelude-python-coding-hook ()
|
||||
(defun prelude-python-mode-hook ()
|
||||
(prelude-coding-hook)
|
||||
(electric-indent-mode -1))
|
||||
|
||||
(add-hook 'python-mode-hook 'prelude-python-coding-hook)
|
||||
(add-hook 'python-mode-hook 'prelude-python-mode-hook)
|
||||
|
||||
(provide 'prelude-python)
|
||||
|
||||
|
|
Loading…
Reference in a new issue