|
|
@ -22,7 +22,7 @@ Define custom =prog-mode= as there are some libraries that do not abide. |
|
|
:hook |
|
|
:hook |
|
|
((conf-mode prog-mode) . uno/run-prog-mode-hook) |
|
|
((conf-mode prog-mode) . uno/run-prog-mode-hook) |
|
|
:init |
|
|
:init |
|
|
(defvar uno-prog-based-modes '(nxml-mode) |
|
|
|
|
|
|
|
|
(defvar uno-prog-based-modes '(nxml-mode prog-mode sgml-mode) |
|
|
"List of prog based modes.") |
|
|
"List of prog based modes.") |
|
|
(defun uno/add-prog-mode (mode) |
|
|
(defun uno/add-prog-mode (mode) |
|
|
"Consider MODE prog based." |
|
|
"Consider MODE prog based." |
|
|
@ -37,14 +37,14 @@ Define custom =prog-mode= as there are some libraries that do not abide. |
|
|
Define custom =text-mode= as there are some libraries that do not abide. |
|
|
Define custom =text-mode= as there are some libraries that do not abide. |
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(use-package emacs |
|
|
|
|
|
|
|
|
(use-package dash |
|
|
:after uno-mode |
|
|
:after uno-mode |
|
|
:hook |
|
|
:hook |
|
|
(text-mode . uno/run-text-mode-hook) |
|
|
(text-mode . uno/run-text-mode-hook) |
|
|
:init |
|
|
:init |
|
|
(defun uno/run-text-mode-hook () |
|
|
(defun uno/run-text-mode-hook () |
|
|
"Configure text mode, checking for prog mode." |
|
|
"Configure text mode, checking for prog mode." |
|
|
(if (member major-mode uno-prog-based-modes) |
|
|
|
|
|
|
|
|
(if (-any? 'derived-mode-p uno-prog-based-modes) |
|
|
(uno/run-prog-mode-hook) |
|
|
(uno/run-prog-mode-hook) |
|
|
(run-hooks 'uno-text-mode-hook)))) |
|
|
(run-hooks 'uno-text-mode-hook)))) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|