summaryrefslogtreecommitdiffstats
path: root/emacs/site-lisp/oni.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-04-15 01:53:47 +0200
committerGravatar Tom Willemse2013-04-15 01:53:47 +0200
commit0de90a0228581bf589c8e4a929c7fb66333e2b72 (patch)
treec2c6d4d6e2e7eab109e5ec8169a1187676207e0d /emacs/site-lisp/oni.el
parenta271d7d0fe71db92c7691411e7a0ab226966bb45 (diff)
downloaddotfiles-0de90a0228581bf589c8e4a929c7fb66333e2b72.tar.gz
dotfiles-0de90a0228581bf589c8e4a929c7fb66333e2b72.zip
Move some minor-mode management from oni.el
Diffstat (limited to 'emacs/site-lisp/oni.el')
-rw-r--r--emacs/site-lisp/oni.el59
1 files changed, 5 insertions, 54 deletions
diff --git a/emacs/site-lisp/oni.el b/emacs/site-lisp/oni.el
index a962741..749ca37 100644
--- a/emacs/site-lisp/oni.el
+++ b/emacs/site-lisp/oni.el
@@ -86,8 +86,7 @@ DOT are intentionally being skipped."
(defun oni:css-mode-func ()
"Function for `css-mode-hook'."
- (local-set-key "\C-j" 'oni:newline-and-indent)
- (rainbow-mode))
+ (local-set-key "\C-j" 'oni:newline-and-indent))
(defun oni:current-jabber-status ()
"Return a string representing the current jabber status."
@@ -100,10 +99,6 @@ DOT are intentionally being skipped."
"Function for `diary-display-hook'."
(diary-fancy-display))
-(defun oni:emacs-lisp-mode-func ()
- "Function for `emacs-lisp-mode-hook'."
- (eldoc-mode))
-
(defun oni:emacs-startup-func ()
"Function for `emacs-init-hook'."
(require 'auto-complete-config)
@@ -123,11 +118,6 @@ DOT are intentionally being skipped."
"Function for `haskell-mode-hook'."
(turn-on-haskell-indentation))
-(defun oni:html-mode-func ()
- "Function for `html-mode-hook'."
- (yas-minor-mode)
- (fci-mode))
-
(defun oni:indent-shift-left (start end &optional count)
"Rigidly indent region.
Region is from START to END. Move
@@ -173,10 +163,6 @@ If COUNT has been specified indent by that much, otherwise look at
(notifications-notify :title title
:body text))
-(defun oni:jabber-chat-mode-func ()
- "Function for `jabber-chat-mode-hook'."
- (visual-line-mode))
-
(defun oni:jabber-roster-mode-func ()
"Function for `jabber-roster-mode-hook'."
(setq mode-line-format
@@ -188,15 +174,12 @@ If COUNT has been specified indent by that much, otherwise look at
(defun oni:js-mode-func ()
"Function for `js-mode-hook'."
- (rainbow-delimiters-mode)
(local-set-key "\C-j" 'oni:newline-and-indent))
(defun oni:js2-mode-func ()
"Function for `js2-mode-hook'."
- (oni:prog-mode-func)
(oni:js-mode-func)
- (local-set-key (kbd "<f5>") #'slime-js-reload)
- (slime-js-minor-mode))
+ (local-set-key (kbd "<f5>") #'slime-js-reload))
(defun oni:kill-region-or-backward-char ()
"Either `kill-region' or `backward-delete-char-untabify'."
@@ -227,7 +210,6 @@ If COUNT has been specified indent by that much, otherwise look at
(defun oni:magit-log-edit-mode-func ()
"Function for `magit-log-edit-mode-hook'."
- (auto-fill-mode)
(font-lock-add-keywords
nil
'(("\\`\\(.\\{,50\\}\\)\\(.*\\)\n?\\(.*\\)$"
@@ -239,16 +221,7 @@ If COUNT has been specified indent by that much, otherwise look at
(defun oni:markdown-mode-func ()
"Function for `markdown-mode-hook'."
- (setq-local comment-auto-fill-only-comments nil)
- (setq-local whitespace-style '(face trailing))
- (auto-fill-mode)
- (whitespace-mode))
-
-(defun oni:message-mode-func ()
- "Function for `message-mode-hook'."
- (setq-local comment-auto-fill-only-comments nil)
- (auto-fill-mode)
- (flyspell-mode))
+ (setq-local whitespace-style '(face trailing)))
(defun oni:mini-fix-timestamp-string (date-string)
"A minimal version of Xah Lee's `fix-timestamp-string'.
@@ -326,38 +299,25 @@ When dealing with braces, add another line and indent that too."
(save-excursion (newline-and-indent)))
(newline-and-indent))
-(defun oni:org-mode-func ()
- "Function for `org-mode-hook'."
- (auto-fill-mode)
- (yas-minor-mode)
- (setq-local comment-auto-fill-only-comments nil))
-
(defun oni:php-mode-func ()
"Function for `php-mode-hook'."
(local-set-key "\C-j" 'oni:newline-and-indent)
(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-close '0)
- (rainbow-delimiters-mode)
(setq-local fci-rule-column 80))
(defun oni:prog-mode-func ()
"Function for `prog-mode-hook'."
- (rainbow-delimiters-mode)
- (fci-mode)
- (yas-minor-mode)
- (auto-fill-mode))
+ (setq-local comment-auto-fill-only-comments t))
(defun oni:python-mode-func ()
"Function for `python-mode-hook'."
(local-set-key (kbd "C->") 'python-indent-shift-right)
(local-set-key (kbd "C-<") 'python-indent-shift-left)
(set (make-local-variable 'electric-indent-chars) nil)
- (rainbow-delimiters-mode)
(setq fci-rule-column 79
fill-column 72)
- (setq-local whitespace-style '(tab-mark))
- (fci-mode)
- (whitespace-mode))
+ (setq-local whitespace-style '(tab-mark)))
(defun oni:rainbow-mode-init ()
"Initialization function for rainbow-mode."
@@ -433,10 +393,6 @@ use. If MODE is not nil, open a new buffer with the name
default-directory "' request-pull " (when patchp "-p ")
from " " url " " to))))))
-(defun oni:rst-mode-func ()
- "Function for `rst-mode-hook'."
- (auto-fill-mode))
-
(defun oni:self-insert-dwim ()
"Execute self insert, but when the region is active call self
insert at the end of the region and at the beginning."
@@ -511,11 +467,6 @@ If no direction is given, don't split."
"Function for `term-mode-hook'."
(setq truncate-lines nil))
-(defun oni:texinfo-mode-func ()
- "Function for `texinfo-mode-hook'."
- (setq-local comment-auto-fill-only-comments nil)
- (auto-fill-mode))
-
(defun oni:write-file-func ()
"Function for `write-file-hooks'."
(time-stamp))