Move markdown-mode-func to viewing library

This commit is contained in:
Tom Willemse 2015-12-17 01:41:58 +01:00
parent 59743ffe50
commit 8420af7190
2 changed files with 8 additions and 5 deletions

View file

@ -141,10 +141,6 @@ MODE1 is enabled and vice-versa."
"Set the `disabled' property for each item in FUNCTIONS to nil." "Set the `disabled' property for each item in FUNCTIONS to nil."
(mapc #'(lambda (f) (put f 'disabled nil)) functions)) (mapc #'(lambda (f) (put f 'disabled nil)) functions))
(defun oni:markdown-mode-func ()
"Function for `markdown-mode-hook'."
(setq-local whitespace-style '(face trailing)))
(defun oni:maybe-fci-mode () (defun oni:maybe-fci-mode ()
"Turn on `fci-mode' if there is a filename for the buffer." "Turn on `fci-mode' if there is a filename for the buffer."
(when (buffer-file-name) (when (buffer-file-name)
@ -1036,7 +1032,7 @@ If no direction is given, don't split."
(oni:add-hooks 'lua-mode-hook 'oni:set-keys-for-lua) (oni:add-hooks 'lua-mode-hook 'oni:set-keys-for-lua)
(oni:add-hooks 'markdown-mode-hook (oni:add-hooks 'markdown-mode-hook
#'whitespace-mode #'oni:markdown-mode-func) #'whitespace-mode 'oni:show-trailing-whitespace)
(oni:add-hooks 'php-mode-hook (oni:add-hooks 'php-mode-hook
#'oni:php-mode-func) #'oni:php-mode-func)

View file

@ -25,10 +25,17 @@
;;; Code: ;;; Code:
(require 'whitespace)
;;;###autoload ;;;###autoload
(defun oni:make-readable () (defun oni:make-readable ()
"Make non-programming buffers a little more readable." "Make non-programming buffers a little more readable."
(setq line-spacing .2)) (setq line-spacing .2))
;;;###autoload
(defun oni:show-trailing-whitespace ()
"Function for `markdown-mode-hook'."
(setq-local whitespace-style '(face trailing)))
(provide 'oni-viewing) (provide 'oni-viewing)
;;; oni-viewing.el ends here ;;; oni-viewing.el ends here