New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting regression #30

Closed
bbatsov opened this Issue Oct 14, 2018 · 12 comments

Comments

2 participants
@bbatsov

bbatsov commented Oct 14, 2018

See:

image

That's my config:

(use-package hl-todo
  :ensure t
  :config
  (setq hl-todo-highlight-punctuation ":")
  (global-hl-todo-mode))
@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

I can't reproduce that.

@bbatsov

This comment has been minimized.

bbatsov commented Oct 14, 2018

Happens for me all the time. My exact setup is here https://github.com/bbatsov/emacs.d (if you'd like to try with it).

@bbatsov

This comment has been minimized.

bbatsov commented Oct 14, 2018

Hmm, seems it's specific to Clojure mode. But I'm pretty certain this used to work in Clojure mode just fine.

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

I was just gonna ask about the major-mode 😜

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

What is the syntax of :? describe-char will show you.

@bbatsov

This comment has been minimized.

bbatsov commented Oct 14, 2018

image

It's symbol.

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

As in emacs-lisp-mode. Must be something else then.

hl-todo-next, which uses the same regexp, is able to find TODO:.

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

Still it has something to do with syntax, specifically this: (("+-*/.<>=!?$%_&:" . "w")) in clojure-font-lock-setup. Removing that fixes things.

@tarsius tarsius closed this in b1b1b69 Oct 14, 2018

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

Well the issue was what I though it was, except that I had now idea that some major-modes had a font-lock syntax table that is different from the major-mode syntax-table.

@bbatsov

This comment has been minimized.

bbatsov commented Oct 14, 2018

Thanks!

Maybe we've messed something up in clojure-mode. There's a lot of legacy there that I never got to cleaning up.

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

And some low-hanging fruit:

Compiling /home/jonas/.emacs.d/lib/clojure-mode/clojure-mode.el...

In toplevel form:
clojure-mode.el:476:1:Warning: Unused lexical argument ‘args’
clojure-mode.el:476:1:Warning: Unused lexical argument ‘orig-fun’

In clojure--replace-let-bindings-and-indent:
clojure-mode.el:487:12:Warning: looking-back called with 1 argument, but
    requires 2-3
clojure-mode.el:2023:1:Warning: Unused lexical variable
    ‘clojure-comment-start’
clojure-mode.el:2083:1:Warning: Unused lexical variable ‘beg’

In clojure-cycle-not:
clojure-mode.el:2426:10:Warning: looking-back called with 1 argument, but
    requires 2-3
clojure-mode.el:2640:1:Warning: Unused lexical variable ‘k’

😜

looking-back called with 1 argument, but requires 2-3 at least must be fixed.

@tarsius

This comment has been minimized.

Owner

tarsius commented Oct 14, 2018

Maybe we've messed something up in clojure-mode.

Doesn't matter there will be other modes that need their syntax-table shadowed. I think with-syntax-table isn't too expensive anyway. I followed the c code along and it seems fairly harmless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment