Move markdown-mode-func to viewing library
This commit is contained in:
parent
59743ffe50
commit
8420af7190
2 changed files with 8 additions and 5 deletions
|
@ -141,10 +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:markdown-mode-func ()
|
||||
"Function for `markdown-mode-hook'."
|
||||
(setq-local whitespace-style '(face trailing)))
|
||||
|
||||
(defun oni:maybe-fci-mode ()
|
||||
"Turn on `fci-mode' if there is a filename for the buffer."
|
||||
(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 'markdown-mode-hook
|
||||
#'whitespace-mode #'oni:markdown-mode-func)
|
||||
#'whitespace-mode 'oni:show-trailing-whitespace)
|
||||
|
||||
(oni:add-hooks 'php-mode-hook
|
||||
#'oni:php-mode-func)
|
||||
|
|
|
@ -25,10 +25,17 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'whitespace)
|
||||
|
||||
;;;###autoload
|
||||
(defun oni:make-readable ()
|
||||
"Make non-programming buffers a little more readable."
|
||||
(setq line-spacing .2))
|
||||
|
||||
;;;###autoload
|
||||
(defun oni:show-trailing-whitespace ()
|
||||
"Function for `markdown-mode-hook'."
|
||||
(setq-local whitespace-style '(face trailing)))
|
||||
|
||||
(provide 'oni-viewing)
|
||||
;;; oni-viewing.el ends here
|
||||
|
|
Loading…
Reference in a new issue