all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2
@ 2013-10-24 15:02 Helmut Eller
  2013-10-24 17:40 ` Stefan Monnier
  2013-10-24 17:49 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: Helmut Eller @ 2013-10-24 15:02 UTC (permalink / raw)
  To: 15699

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

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@gnu.org-20131019023520-s8mwtib7xcx9e05w


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: lisp-mode.patch --]
[-- Type: text/x-diff, Size: 1196 bytes --]

=== 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))


^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2
  2013-10-24 15:02 bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2 Helmut Eller
@ 2013-10-24 17:40 ` Stefan Monnier
  2013-10-24 17:49 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2013-10-24 17:40 UTC (permalink / raw)
  To: Helmut Eller; +Cc: 15699

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2
  2013-10-24 15:02 bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2 Helmut Eller
  2013-10-24 17:40 ` Stefan Monnier
@ 2013-10-24 17:49 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2013-10-24 17:49 UTC (permalink / raw)
  To: Helmut Eller; +Cc: 15699-done

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-24 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-24 15:02 bug#15699: 24.3.50; lisp-cl-font-lock-keywords-2 Helmut Eller
2013-10-24 17:40 ` Stefan Monnier
2013-10-24 17:49 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.