GNU bug report logs - #15699
24.3.50; lisp-cl-font-lock-keywords-2

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Thu, 24 Oct 2013 15:03:01 UTC

Severity: normal

Tags: patch

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 15699 in the body.
You can then email your comments to 15699 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#15699; Package emacs. (Thu, 24 Oct 2013 15:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Helmut Eller <eller.helmut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 24 Oct 2013 15:03:03 GMT) Full text and rfc822 format available.

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

From: Helmut Eller <eller.helmut <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; lisp-cl-font-lock-keywords-2
Date: Thu, 24 Oct 2013 17:02:22 +0200
[Message part 1 (text/plain, inline)]
In lisp-mode, "labels" and "flet" are not highlighted while stuff like
"letrec" and "save-excursion" are (wrongly) highlighted.  To see that,
open a file with name "foo.lisp" and insert something like:

 (labels ((foo ())) (letrec ((bar bar))))

I think that the patch below would fix this problem. The patch also
removes "featurep" because that's not a defined operator in Common Lisp.
I can also write a ERT test if needed.

In GNU Emacs 24.3.50.4 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2013-10-19 on ix
Bzr revision: 114715 rgm <at> gnu.org-20131019023520-s8mwtib7xcx9e05w

[lisp-mode.patch (text/x-diff, inline)]
=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- lisp/emacs-lisp/lisp-mode.el	2013-10-08 14:57:18 +0000
+++ lisp/emacs-lisp/lisp-mode.el	2013-10-24 14:57:07 +0000
@@ -251,9 +251,7 @@
                              (cons "go" (mapcar (lambda (s) (concat "cl-" s))
                                                 (remove "go" cl-lib-kw))))
                             t)
-                (regexp-opt (append lisp-kw el-kw eieio-kw
-                                    (cons "go" (mapcar (lambda (s) (concat "cl-" s))
-                                                       (remove "go" cl-kw))))
+                (regexp-opt (append lisp-kw cl-kw eieio-kw cl-lib-kw)
                             t)
 
                 ;; Elisp and Common Lisp "errors".
@@ -360,7 +358,7 @@
        ;; Control structures.  Common Lisp forms.
        (,(concat "(" cl-kws-re "\\_>") . 1)
        ;; Exit/Feature symbols as constants.
-       (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>"
+       (,(concat "(\\(catch\\|throw\\|provide\\|require\\)\\_>"
                  "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?")
         (1 font-lock-keyword-face)
         (2 font-lock-constant-face nil t))


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15699; Package emacs. (Thu, 24 Oct 2013 17:41:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 15699 <at> debbugs.gnu.org
Subject: Re: bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2
Date: Thu, 24 Oct 2013 13:40:37 -0400
> In lisp-mode, "labels" and "flet" are not highlighted while stuff like

Indeed, you should use cl-lib (and hence cl-labels and cl-flet).


        Stefan




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Thu, 24 Oct 2013 17:50:01 GMT) Full text and rfc822 format available.

Notification sent to Helmut Eller <eller.helmut <at> gmail.com>:
bug acknowledged by developer. (Thu, 24 Oct 2013 17:50:04 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 15699-done <at> debbugs.gnu.org
Subject: Re: bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2
Date: Thu, 24 Oct 2013 13:49:46 -0400
> In lisp-mode, "labels" and "flet" are not highlighted while stuff like
> "letrec" and "save-excursion" are (wrongly) highlighted.  To see that,
> open a file with name "foo.lisp" and insert something like:

Hmm... duh... sorry for the previous message, I misread and fired too quickly.
I installed your patch into trunk, thank you,


        Stefan




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

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

Previous Next


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