summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-07-26 01:09:59 +0200
committerGravatar Tom Willemsen2011-07-26 01:09:59 +0200
commit9873823e768e59282f6ca32b3292a50cfe37d39a (patch)
tree05c0de31f56ecbbb9521ed3f4e9ce61e2069b4b8
parent3de2fae2462ad216292ee3d54657d2b03d5252a8 (diff)
downloaddotfiles-9873823e768e59282f6ca32b3292a50cfe37d39a.tar.gz
dotfiles-9873823e768e59282f6ca32b3292a50cfe37d39a.zip
Moved column-marker settings back to emacs.el
-rw-r--r--emacs.d/functions.el11
-rw-r--r--emacs.el28
2 files changed, 23 insertions, 16 deletions
diff --git a/emacs.d/functions.el b/emacs.d/functions.el
index b08efb6..6dec89f 100644
--- a/emacs.d/functions.el
+++ b/emacs.d/functions.el
@@ -88,11 +88,6 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
"Find out which major-mode is currently used"
(with-current-buffer buffer-or-string major-mode))
-(defun set-column-marker ()
- "Default column markers"
- (column-marker-1 73)
- (column-marker-2 81))
-
(defun setup-system-frame-colours (&rest frame)
(let ((f (if (car frame)
(car frame)
@@ -172,7 +167,6 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
0 font-lock-constant-face)
("\\b\\(\\.[0-9]+\\([eE][-+]?[0-9]+\\)?\\([lL]\\|[fF]\\|[dD]\\)?\\)\\b"
0 font-lock-constant-face)))
- (set-column-marker)
(rainbow-delimiters-mode)
(pretty-lambdas)
(auto-fill-mode 1))
@@ -185,8 +179,7 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
(defun on-html-mode ()
(local-set-key [f9] 'browse-to-current-file)
- (auto-fill-mode)
- (set-column-marker))
+ (auto-fill-mode))
(defun on-markdown-mode ()
(whitespace-mode)
@@ -197,8 +190,6 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
(auto-fill-mode 1))
(defun on-php-mode ()
- (column-marker-1 76)
- (column-marker-2 81)
(local-set-key [f6] 'comment-line))
(defun on-mail-mode ()
diff --git a/emacs.el b/emacs.el
index f139a88..97b0a89 100644
--- a/emacs.el
+++ b/emacs.el
@@ -1,8 +1,27 @@
;; -*- mode: Emacs-Lisp; -*-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; LOAD-PATHS ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'load-path "~/.emacs.d/elisp")
+
+;; Autopair
+(require 'autopair)
+(autopair-global-mode t) ; automatically add the other delimiter
+(setq autopair-skip-criteria 'always)
+
+;; Column marker
+(defun set-column-markers (cm1 cm2)
+ (column-marker-1 cm1)
+ (column-marker-2 cm2))
+
+(require 'column-marker)
+
+(dolist (hook '(prog-mode-hook html-mode-hook))
+ (add-hook hook
+ (lambda ()
+ (set-column-markers 73 81))))
+
+(add-hook 'php-mode-hook
+ (lambda ()
+ (set-column-markers 76 81)))
+
(add-to-list 'load-path "~/.emacs.d/elisp/markdown-mode")
(add-to-list 'load-path "~/.emacs.d/elisp/git-commit-mode")
(add-to-list 'load-path "~/.emacs.d/elisp/lua-mode")
@@ -11,8 +30,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; REQUIRES ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(require 'autopair)
-(require 'column-marker)
(require 'org-crypt)
(require 'rainbow-delimiters)
(require 'uniquify)
@@ -133,7 +150,6 @@
(delete-selection-mode t) ; delete selection upon typing
(show-paren-mode t) ; show the opposite paren
(ido-mode t)
-(autopair-global-mode) ; automatically add the other delimiter
(add-to-list 'compilation-finish-functions 'my-comp-finish-function)