diff options
author | Tom Willemse | 2015-12-17 01:45:13 +0100 |
---|---|---|
committer | Tom Willemse | 2015-12-17 01:46:54 +0100 |
commit | bdf984607ec876f1e124fbd2806d382bc084131c (patch) | |
tree | f9b070af412a69871bc349ae470407eb4deab375 /emacs | |
parent | 83b0c62b4999ef7187e2987dd5d84da1376250fc (diff) | |
download | dotfiles-bdf984607ec876f1e124fbd2806d382bc084131c.tar.gz dotfiles-bdf984607ec876f1e124fbd2806d382bc084131c.zip |
Move some functions to viewing library
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init.el | 16 | ||||
-rw-r--r-- | emacs/.emacs.d/site-lisp/oni-viewing.el | 13 |
2 files changed, 16 insertions, 13 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 27f5579..8bd0916 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -141,16 +141,6 @@ MODE1 is enabled and vice-versa." "Set the `disabled' property for each item in FUNCTIONS to nil." (mapc #'(lambda (f) (put f 'disabled nil)) functions)) -(defun oni:maybe-fci-mode () - "Turn on `fci-mode' if there is a filename for the buffer." - (when (buffer-file-name) - (fci-mode))) - -(defun oni:maybe-prettify-symbols-mode (&optional arg) - "See of `prettify-symbols-mode' is bound and call it if so." - (when (fboundp 'prettify-symbols-mode) - (prettify-symbols-mode arg))) - (defun oni:mini-fix-timestamp-string (date-string) "A minimal version of Xah Lee's `fix-timestamp-string'. Turn DATE-STRING into something else that can be worked with in @@ -1009,7 +999,7 @@ If no direction is given, don't split." (gnus-summary-next-subject 1))))) (oni:add-hooks 'html-mode-hook - #'oni:maybe-fci-mode #'tagedit-mode #'turn-off-flyspell + 'oni:maybe-fci-mode #'tagedit-mode #'turn-off-flyspell #'turn-off-auto-fill) (oni:add-hooks 'hy-mode-hook @@ -1038,8 +1028,8 @@ If no direction is given, don't split." #'oni:php-mode-func) (oni:add-hooks 'prog-mode-hook - #'oni:prog-mode-func #'oni:maybe-fci-mode #'rainbow-delimiters-mode - #'oni:maybe-prettify-symbols-mode) + #'oni:prog-mode-func 'oni:maybe-fci-mode #'rainbow-delimiters-mode + 'oni:maybe-prettify-symbols-mode) (oni:add-hooks 'python-mode-hook (lambda () (setq ac-sources '(ac-source-jedi-direct))) diff --git a/emacs/.emacs.d/site-lisp/oni-viewing.el b/emacs/.emacs.d/site-lisp/oni-viewing.el index 9af6a2f..cbe1fb0 100644 --- a/emacs/.emacs.d/site-lisp/oni-viewing.el +++ b/emacs/.emacs.d/site-lisp/oni-viewing.el @@ -26,6 +26,7 @@ ;;; Code: (require 'whitespace) +(require 'fill-column-indicator) ;;;###autoload (defun oni:make-readable () @@ -33,6 +34,18 @@ (setq line-spacing .2)) ;;;###autoload +(defun oni:maybe-fci-mode () + "Turn on `fci-mode' if there is a filename for the buffer." + (when (buffer-file-name) + (fci-mode))) + +;;;###autoload +(defun oni:maybe-prettify-symbols-mode (&optional arg) + "See of `prettify-symbols-mode' is bound and call it if so." + (when (fboundp 'prettify-symbols-mode) + (prettify-symbols-mode arg))) + +;;;###autoload (defun oni:show-trailing-whitespace () "Function for `markdown-mode-hook'." (setq-local whitespace-style '(face trailing))) |