Reset hl-todo-mode if already active
This commit is contained in:
parent
d600d36675
commit
248ea4c2c7
1 changed files with 7 additions and 3 deletions
|
@ -7,8 +7,12 @@
|
||||||
This is useful for major modes that don't use or have a valid syntax-table entry
|
This is useful for major modes that don't use or have a valid syntax-table entry
|
||||||
for comment start/end characters."
|
for comment start/end characters."
|
||||||
(set (make-local-variable 'hl-todo-keywords)
|
(set (make-local-variable 'hl-todo-keywords)
|
||||||
`(((lambda (limit)
|
'(((lambda (limit)
|
||||||
(let (case-fold-search)
|
(let (case-fold-search)
|
||||||
(and (re-search-forward hl-todo-regexp limit t)
|
(and (re-search-forward hl-todo-regexp limit t)
|
||||||
(memq 'font-lock-comment-face (doom-enlist (get-text-property (point) 'face)))))
|
(memq 'font-lock-comment-face (doom-enlist (get-text-property (point) 'face))))))
|
||||||
(1 (hl-todo-get-face) t t))))))
|
(1 (hl-todo-get-face) t t))))
|
||||||
|
(when hl-todo-mode
|
||||||
|
(hl-todo-mode -1)
|
||||||
|
(hl-todo-mode +1)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue