Move vala-mode-func to editing library

This commit is contained in:
Tom Willemse 2015-12-18 21:36:56 +01:00
parent 9f3b09b5b1
commit 7442449659
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:vala-mode-func ()
"Function for `vala-mode-hook'."
(setq indent-tabs-mode nil))
(defun oni:write-file-func () (defun oni:write-file-func ()
"Function for `write-file-hooks'." "Function for `write-file-hooks'."
(time-stamp)) (time-stamp))
@ -560,7 +556,9 @@ MODE1 is enabled and vice-versa."
;; Disable line truncation in term-mode. ;; Disable line truncation in term-mode.
(add-hook 'term-mode-hook 'oni:disable-line-truncation) (add-hook 'term-mode-hook 'oni:disable-line-truncation)
(add-hook 'vala-mode-hook #'oni:vala-mode-func) ;; Don't use tabs in vala-mode
(add-hook 'vala-mode-hook 'oni:disable-tabs-mode)
(add-hook 'write-file-hooks 'oni:write-file-func) (add-hook 'write-file-hooks 'oni:write-file-func)
(add-hook 'yas-global-mode-hook 'oni:yas-minor-mode-func) (add-hook 'yas-global-mode-hook 'oni:yas-minor-mode-func)

View file

@ -55,6 +55,11 @@
(interactive) (interactive)
(oni:change-number-at-point #'1-)) (oni:change-number-at-point #'1-))
;;;###autoload
(defun oni:disable-tabs-mode ()
"Function for `vala-mode-hook'."
(setq indent-tabs-mode nil))
;;;###autoload ;;;###autoload
(defun oni:downcase-prev (num) (defun oni:downcase-prev (num)
(interactive "p") (interactive "p")