Skip to content

Conversation

tanzoniteblack
Copy link
Contributor

Currently foo/some-var will fontlock foo, but if this item is
something that can be dereffed and you type @foo/some-var, foo is no
longer font-locked.

Similarly: *dynamic-var* is font locked, but @ breaks the regex.

In this change the @ sign isn't font locked, but the var that follows
it is.

@bbatsov
Copy link
Member

bbatsov commented Aug 21, 2014

The change looks good, but it needs a couple of font-lock unit tests (see the existing tests for reference).

Currently `foo/some-var` will fontlock `foo`, but if this item is
something that can be dereffed and you type `@foo/some-var`, `foo` is no
longer font-locked.

Similarly: `*dynamic-var*` is font locked, but `@` breaks the regex.

In this change the `@` sign isn't font locked, but the var that follows
it is.

Conflicts:
	clojure-mode.el

Add tests for dynamic-var and ns/refer fontlock
@tanzoniteblack
Copy link
Contributor Author

I've added tests to verify the fontlock works (the 2nd statement in each tests fails if you attempt to run against master, which is what we'd expect) and have squashed it all into one commit for a prettier git history.

bbatsov added a commit that referenced this pull request Aug 22, 2014
@(dynamic)variable shouldn't break fontlock
@bbatsov bbatsov merged commit 73f550d into clojure-emacs:master Aug 22, 2014
@bbatsov
Copy link
Member

bbatsov commented Aug 22, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants