GNU bug report logs - #16480
24.3.50; fontification in the definition of ert tests names does not highlight full symbol

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Fri, 17 Jan 2014 09:44:02 UTC

Severity: minor

Tags: confirmed

Merged with 16620

Found in version 24.3.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16480 in the body.
You can then email your comments to 16480 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16480; Package emacs. (Fri, 17 Jan 2014 09:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Richard <theonewiththeevillook <at> yahoo.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 17 Jan 2014 09:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: bug-gnu-emacs <at> gnu.org
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.




Merged 16480 16620. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 02 Feb 2014 00:18:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 05 Mar 2014 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.