GNU bug report logs - #16620
24.3.50; Font-lock rule for `ert' does not handle words with dashes (fix included)

Previous Next

Package: emacs;

Reported by: Anders Lindgren <andlind <at> gmail.com>

Date: Sat, 1 Feb 2014 23:38:02 UTC

Severity: minor

Tags: confirmed

Merged with 16480

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 16620 in the body.
You can then email your comments to 16620 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#16620; Package emacs. (Sat, 01 Feb 2014 23:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anders Lindgren <andlind <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 01 Feb 2014 23:38:04 GMT) Full text and rfc822 format available.

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

From: Anders Lindgren <andlind <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Font-lock rule for `ert' does not handle words with dashes
 (fix included)
Date: Sun, 2 Feb 2014 00:36:49 +0100
[Message part 1 (text/plain, inline)]
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.

For example, here only "alpha" is highlighted:

    (ert-deftest alpha-beta ()

This could easily be fixed by replacing the original regexp:

    "(\\(\\<ert-deftest\\)\\>\\s *\\(\\sw+\\)?"

with (which is the construct used to highlight `defun'):

    "(\\(\\<ert-deftest\\)\\>\\s *\\(\\(?:\\sw\\|\\s_\\)+\\)?"

See `ert--activate-font-lock-keywords' in the file `ert.el'.

    -- Anders

In GNU Emacs 24.3.50.4 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
 of 2014-01-16 on macpro.lan
Repository revision: 116039
eggert <at> cs.ucla.edu-20140116062406-oh0d3tsfqytj28ta
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'

Important settings:
  value of $LC_CTYPE: UTF-8
  locale-coding-system: utf-8-unix

Major mode: Font-Lock-Studio

Minor modes in effect:
  shell-dirtrack-mode: t
  global-auto-revert-mode: t
  global-cwarn-mode: t
  minibuffer-electric-file-mode: t
  recentf-mode: t
  msb-mode: t
  display-time-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
a n SPC t h e SPC s a m e SPC t h e <backspace> i n
g . C-a C-x C-s C-v C-v <escape> < C-s e x p l a i
n ( <backspace> C-s C-s C-s C-s C-s C-a <escape> <
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> M-f M-f M-f
s SPC " e x p l a n <backspace> <backspace> a i n "
SPC a n d SPC <escape> q M-f M-f M-f <left> <left>
<left> <left> <left> <backspace> C-a C-x C-s C-v C-v
C-v C-M-e C-M-e C-M-e C-M-e C-M-e C-M-e C-M-e C-M-e
C-M-e <down> <down> M-f M-f <right> SPC <backspace>
C-SPC C-M-f <escape> w C-a C-x C-s C-x C-f <down> <return>
C-x k <return> C-x C-f <up> <return> C-v <escape> x
f o n t - o <backspace> l o c <tab> s t <tab> <return>
<down> <down> M-f <right> C-s C-w C-w C-w C-w C-w C-s
C-s C-r C-r C-a <up> <up> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> C-SPC <right> <right> <right> <right> <left>
<left> <left> <left> <left> <left> <left> C-SPC <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <escape> w <right>
<escape> w <escape> x e r <backspace> <backspace> r
e p o r t - e <backspace> e m <tab> <return>

Recent messages:
Mark set
Matches
"(\\(cl-def\\(?:macro\\|s\\(?:\\(?:truc\\|ubs\\)t\\)\\|type\\|un\\)\\|def\\(?:a\\(?:dvice\\|lias\\)\\|c\\(?:lass\\|onst\\|ustom\\)\\|face\\|g\\(?:eneric\\|roup\\)\\|ine-\\(?:derived-mode\\|g\\(?:\\(?:eneric\\|lobal\\(?:\\(?:ized\\)?-minor\\)\\)-mode\\)\\|minor-mode\\|skeleton\\|widget\\)\\|m\\(?:acro\\|ethod\\)\\|subst\\|theme\\|un\\|var\\(?:-local\\|alias\\)?\\)\\)\\_>[
\t'(]*\\(\\(?:\\sw\\|\\s_\\)... [+1] [2 times]
Matches
"(\\(cl-def\\(?:macro\\|s\\(?:\\(?:truc\\|ubs\\)t\\)\\|type\\|un\\)\\|def\\(?:a\\(?:dvice\\|lias\\)\\|c\\(?:lass\\|onst\\|ustom\\)\\|face\\|g\\(?:eneric\\|roup\\)\\|ine-\\(?:derived-mode\\|g\\(?:\\(?:eneric\\|lobal\\(?:\\(?:ized\\)?-minor\\)\\)-mode\\)\\|minor-mode\\|skeleton\\|widget\\)\\|m\\(?:acro\\|ethod\\)\\|subst\\|theme\\|un\\|var\\(?:-local\\|alias\\)?\\)\\)\\_>[
\t'(]*\\(\\(?:\\sw\\|\\s_\\)+\\)... [+1]
Mark set
Matches
"(\\(cl-def\\(?:macro\\|s\\(?:\\(?:truc\\|ubs\\)t\\)\\|type\\|un\\)\\|def\\(?:a\\(?:dvice\\|lias\\)\\|c\\(?:lass\\|onst\\|ustom\\)\\|face\\|g\\(?:eneric\\|roup\\)\\|ine-\\(?:derived-mode\\|g\\(?:\\(?:eneric\\|lobal\\(?:\\(?:ized\\)?-minor\\)\\)-mode\\)\\|minor-mode\\|skeleton\\|widget\\)\\|m\\(?:acro\\|ethod\\)\\|subst\\|theme\\|un\\|var\\(?:-local\\|alias\\)?\\)\\)\\_>[
\t'(]*\\(\\(?:\\sw\\|\\s_\\)+\\)... [+1]
Matches
"(\\(cl-def\\(?:macro\\|s\\(?:\\(?:truc\\|ubs\\)t\\)\\|type\\|un\\)\\|def\\(?:a\\(?:dvice\\|lias\\)\\|c\\(?:lass\\|onst\\|ustom\\)\\|face\\|g\\(?:eneric\\|roup\\)\\|ine-\\(?:derived-mode\\|g\\(?:\\(?:eneric\\|lobal\\(?:\\(?:ized\\)?-minor\\)\\)-mode\\)\\|minor-mode\\|skeleton\\|widget\\)\\|m\\(?:acro\\|ethod\\)\\|subst\\|theme\\|un\\|var\\(?:-local\\|alias\\)?\\)\\)\\_>[
\t'(]*\\(\\(?:\\sw\\|\\s_\\)... [+1]
Matches
"(\\(cl-def\\(?:macro\\|s\\(?:\\(?:truc\\|ubs\\)t\\)\\|type\\|un\\)\\|def\\(?:a\\(?:dvice\\|lias\\)\\|c\\(?:lass\\|onst\\|ustom\\)\\|face\\|g\\(?:eneric\\|roup\\)\\|ine-\\(?:derived-mode\\|g\\(?:\\(?:eneric\\|lobal\\(?:\\(?:ized\\)?-minor\\)\\)-mode\\)\\|minor-mode\\|skeleton\\|widget\\)\\|m\\(?:acro\\|ethod\\)\\|subst\\|theme\\|un\\|var\\(?:-local\\|alias\\)?\\)\\)\\_>[
\t'(]*\\(\\(... [-1-]
Matches
"(\\(cl-def\\(?:macro\\|s\\(?:\\(?:truc\\|ubs\\)t\\)\\|type\\|un\\)\\|def\\(?:a\\(?:dvice\\|lias\\)\\|c\\(?:lass\\|onst\\|ustom\\)\\|face\\|g\\(?:eneric\\|roup\\)\\|ine-\\(?:derived-mode\\|g\\(?:\\(?:eneric\\|lobal\\(?:\\(?:ized\\)?-minor\\)\\)-mode\\)\\|minor-mode\\|skeleton\\|widget\\)\\|m\\(?:acro\\|ethod\\)\\|subst\\|theme\\|un\\|var\\(?:-local\\|alias\\)?\\)\\)\\_>[
\t'(]*\\(... [-1-]
Library idna specified by `autoload' does not exist.
Library messagexmas specified by `autoload' does not exist.

Load-path shadows:
/Users/anders/emacs/lisp/table hides
/Volumes/HD2/build/emacs8/trunk/nextstep/Emacs.app/Contents/Resources/lisp/textmodes/table
/Users/anders/emacs/lisp/ruby-mode hides
/Volumes/HD2/build/emacs8/trunk/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/ruby-mode
/Users/anders/emacs/src/asm-mode-new/src/asm-mode hides
/Volumes/HD2/build/emacs8/trunk/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/asm-mode

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail superword
subword image-file eieio-opt speedbar sb-image ezimage dframe face-remap
mb-depth two-column grep icicles-mode icicles-face icicles-cmd2
icicles-cmd1 imenu icicles-mcmd image-dired format-spec icicles-fn
icicles-var icicles-opt ffap cus-theme thingatpt filesets icicles-mac
cus-edit yow shell pcomplete cookie1 bookmark compile autoload tar-mode
lisp-mnt mail-utils parse-time network-stream starttls url-http tls
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url-auth
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source eieio byte-opt bytecomp
byte-compile cconv eieio-core gnus-util mm-util mail-prsvr
password-cache url-vars mailcap finder-inf package mule-util etags
cperl-mode edebug sgml-mode rdebug-source rdebug-vars gud ruby-mode
font-lock-studio-test ispell cus-start cus-load ctypes end-of-buffer-log
doxygen c-electric-operator c-indent-operator cc-langs ert ewoc faceup
rect vc-bzr find-func debug sh-script smie executable jka-compr info
apropos dired+ dired-x dired-aux pp font-lock-studio derived dired
dabbrev follow misearch multi-isearch vc-dispatcher vc-svn help-mode
eldoc ps-print ps-def lpr server autorevert filenotify folding-isearch
folding view rdebug cwarn prepaint cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs tempo split-nways
lockdir project-name ange-ftp comint ansi-color ring paren mic-paren
cl-macs gv iso-insert minibuf-elfile easy-mmode recentf tree-widget
wid-edit easymenu msb edmacro kmacro disp-table warnings time advice
help-fns cl cl-loaddefs cl-lib time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)
[Message part 2 (text/html, inline)]

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.

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Tue, 04 Feb 2014 17:39:02 GMT) Full text and rfc822 format available.

Notification sent to Anders Lindgren <andlind <at> gmail.com>:
bug acknowledged by developer. (Tue, 04 Feb 2014 17:39:03 GMT) Full text and rfc822 format available.

Message #12 received at 16620-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Anders Lindgren <andlind <at> gmail.com>
Cc: 16620-done <at> debbugs.gnu.org
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
> 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




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Tue, 04 Feb 2014 17:39:04 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Richard <theonewiththeevillook <at> yahoo.fr>:
bug acknowledged by developer. (Tue, 04 Feb 2014 17:39:04 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:04 GMT) Full text and rfc822 format available.

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

Previous Next


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