chore: Improve loading of prog-mode features into non-prog-mode modes

There are a few major modes which are not based on prog-mode, that I
want to behave like prog-mode. Previously each did nearly all the same
setup that's done via the prog-mode hooks. Now instead let's actually
run runs the hooks for prog-mode.
This commit is contained in:
2020-01-26 20:25:49 +00:00
parent e1d64b8d19
commit 290ba13b1c
9 changed files with 9 additions and 66 deletions

View File

@@ -23,7 +23,9 @@
;; Editor
(require 'siren-browse-kill-ring)
(require 'siren-display-indentation)
(require 'siren-fci)
(require 'siren-helm-command)
(require 'siren-highlight-symbol)
(require 'siren-ido)
(require 'siren-linum)
(require 'siren-minions)

View File

@@ -6,8 +6,6 @@
;;; Code:
;; (require 'siren-fci)
(use-package company
:hook
(company-completion-started . siren-company--turn-off-fci)

View File

@@ -6,14 +6,7 @@
;;; Code:
(require 'siren-display-indentation)
(require 'siren-fci)
(require 'siren-flyspell)
(require 'siren-linum)
(require 'siren-prog-mode)
(require 'siren-flycheck)
(require 'siren-highlight-symbol)
(require 'siren-smartparens)
(use-package conf-mode
:mode "Procfile\\'" "\\.conf\\'" "\\.cfg\\'"
@@ -21,16 +14,8 @@
:init
(defun siren-conf-mode-setup ()
(siren-prog-mode-setup)
(setq tab-width 2)
(siren-display-indentation)
(fci-mode)
(flycheck-mode)
(flyspell-prog-mode)
(highlight-symbol-mode)
(linum-mode)
(smartparens-mode)))
(run-hooks 'prog-mode-hook)
(setq tab-width 2)))
(provide 'siren-conf)
;;; siren-conf.el ends here

View File

@@ -6,14 +6,7 @@
;;; Code:
(require 'siren-display-indentation)
(require 'siren-fci)
(require 'siren-flyspell)
(require 'siren-linum)
(require 'siren-prog-mode)
(require 'siren-flycheck)
(require 'siren-highlight-symbol)
(require 'siren-smartparens)
(use-package feature-mode
:mode "\\.feature\\'"
@@ -22,16 +15,8 @@
:init
(defun siren-feature-mode-setup ()
(siren-prog-mode-setup)
(setq tab-width 2)
(siren-display-indentation)
(fci-mode)
(flycheck-mode)
(flyspell-prog-mode)
(highlight-symbol-mode)
(linum-mode)
(smartparens-mode)))
(run-hooks 'prog-mode-hook)
(setq tab-width 2)))
(provide 'siren-cucumber)
;;; siren-cucumber.el ends here

View File

@@ -10,7 +10,6 @@
(require 'siren-folding)
(require 'siren-projectile)
(require 'siren-realgud)
(require 'siren-smartparens)
(require 'siren-toggle-quotes)
(add-to-list 'projectile-globally-ignored-directories "vendor/bundle")

View File

@@ -6,13 +6,7 @@
;;; Code:
(require 'siren-fci)
(require 'siren-flyspell)
(require 'siren-linum)
(require 'siren-prog-mode)
(require 'siren-flycheck)
(require 'siren-highlight-symbol)
(require 'siren-smartparens)
(use-package thrift
:mode "\\.thrift\\'"
@@ -20,15 +14,9 @@
:init
(defun siren-thrift-mode-setup ()
(siren-prog-mode-setup)
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(fci-mode)
(flycheck-mode)
(flyspell-prog-mode)
(highlight-symbol-mode)
(linum-mode)
(smartparens-mode)
(subword-mode +1)))
(provide 'siren-thrift)

View File

@@ -6,12 +6,7 @@
;;; Code:
(require 'siren-display-indentation)
(require 'siren-fci)
(require 'siren-flyspell)
(require 'siren-linum)
(require 'siren-prog-mode)
(require 'siren-smartparens)
(use-package yaml-mode
:mode "\\.yml\\'" "\\.yaml\\'"
@@ -23,15 +18,8 @@
:init
(defun siren-yaml-mode-setup ()
(siren-prog-mode-setup)
(setq tab-width 2
whitespace-action '(auto-cleanup))
(siren-display-indentation)
(fci-mode)
(flyspell-mode)
(linum-mode t)
(smartparens-mode +1)
(run-hooks 'prog-mode-hook)
(setq tab-width 2)
(subword-mode +1)))
(use-package yaml-imenu

View File

@@ -6,8 +6,6 @@
;;; Code:
(require 'siren-linum)
(use-package zone
:ensure nil ;; loaded from emacs built-ins
:init