Browse Source

Improve detection of text/prog modes

master
Juan Placencia 4 years ago
parent
commit
0d100d692c
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      uno/modules/mode.org

+ 3
- 3
uno/modules/mode.org View File

@ -22,7 +22,7 @@ Define custom =prog-mode= as there are some libraries that do not abide.
:hook
((conf-mode prog-mode) . uno/run-prog-mode-hook)
:init
(defvar uno-prog-based-modes '(nxml-mode)
(defvar uno-prog-based-modes '(nxml-mode prog-mode sgml-mode)
"List of prog based modes.")
(defun uno/add-prog-mode (mode)
"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.
#+BEGIN_SRC emacs-lisp
(use-package emacs
(use-package dash
:after uno-mode
:hook
(text-mode . uno/run-text-mode-hook)
:init
(defun uno/run-text-mode-hook ()
"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)
(run-hooks 'uno-text-mode-hook))))
#+END_SRC

Loading…
Cancel
Save