emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#16480: closed (24.3.50; fontification in the defin


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#16480: closed (24.3.50; fontification in the definition of ert tests names does not highlight full symbol)
Date: Tue, 04 Feb 2014 17:39:04 +0000

Your message dated Tue, 04 Feb 2014 12:37:37 -0500
with message-id <address@hidden>
and subject line Re: bug#16620: 24.3.50; Font-lock rule for `ert' does not 
handle words with dashes (fix included)
has caused the debbugs.gnu.org bug report #16620,
regarding 24.3.50; fontification in the definition of ert tests names does not 
highlight full symbol
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
16620: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16620
GNU Bug Tracking System
Contact address@hidden with problems
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]