--- Begin Message ---
Subject: |
24.3.50; fontification in the definition of ert tests names does not highlight full symbol |
Date: |
Fri, 17 Jan 2014 10:43:09 +0100 |
Hello,
Running:
emacs -Q -l ert testfile.el
with the following content of testfile.el:
(ert-deftest latex-movement ...)
(defun latex-movement ...)
will highlight only 'latex' in the first line, instead of the whole
symbol 'latex-movement'. Second line is just there to check that it
works for defun.
Here's a fix:
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 4b11860..ee058a8 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1469,7 +1469,7 @@ the tests)."
"Activate font-lock keywords for some of ERT's symbols."
(font-lock-add-keywords
nil
- '(("(\\(\\<ert-deftest\\)\\>\\s *\\(\\sw+\\)?"
+ '(("(\\(\\<ert-deftest\\)\\>\\s *\\(\\(?:\\sw\\|\\s_\\)+\\)?"
(1 font-lock-keyword-face nil t)
(2 font-lock-function-name-face nil t)))))
--
Nico.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#16620: 24.3.50; Font-lock rule for `ert' does not handle words with dashes (fix included) |
Date: |
Tue, 04 Feb 2014 12:37:37 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> The package `ert', adds Font Lock keywords to highlight the `ert-deftest'
> construct. Unfortunately, the regexp used does not handle the case when the
> name of the test contains a dash.
Thanks, installed,
Stefan
--- End Message ---