-
I am using hl-todo-mode and it highlights TODO keyword and also : punctuation without any problem. However, I also want it to highlight all the words after the TODO keyword until the end of the line. How can I achieve it? I tried to enable the extend attribute of faces but it didn't work. |
Beta Was this translation helpful? Give feedback.
Answered by
tarsius
Nov 6, 2022
Replies: 1 comment 1 reply
-
You can apply this patch: diff --git a/hl-todo.el b/hl-todo.el
index e03e9d0..4ec7ebb 100644
--- a/hl-todo.el
+++ b/hl-todo.el
@@ -210,16 +210,13 @@ (defun hl-todo--setup-regexp ()
(concat "\\(\\<"
"\\(" (mapconcat #'car hl-todo-keyword-faces "\\|") "\\)"
"\\>"
- (and (not (equal hl-todo-highlight-punctuation ""))
- (concat "[" hl-todo-highlight-punctuation "]"
- (if hl-todo-require-punctuation "+" "*")))
- "\\)")))
+ "[^\"\n]*\\)")))
(defun hl-todo--setup ()
(hl-todo--setup-regexp)
(setq hl-todo--keywords
`((,(lambda (bound) (hl-todo--search nil bound))
- (1 (hl-todo--get-face) prepend t))))
+ (0 (hl-todo--get-face) prepend t))))
(font-lock-add-keywords nil hl-todo--keywords t))
(defvar hl-todo--syntax-table (copy-syntax-table text-mode-syntax-table)) I am not sure why we have to use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
efeyitim
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can apply this patch: