joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.27k stars 145 forks source link

user-defined macro/function names are not highlighted #337

Open some-mthfka opened 4 years ago

some-mthfka commented 4 years ago

Hi!

emacs -Q
(require 'package)
(package-initialize)
(lisp-mode)
M-x load-library sly
M-x sly

sly-eval-defun on both of these:

(defmacro ma (&body body)
  body)

(defun aa (a b)
  (+ a b))

Insert

(aa or (ma

and neither of these are highlighted as a function or macro name. The builtin macros and functions are highlighted just fine.

The indentation seems to work though.

What could this be?

Emacs 26.3 SLY 1.0.0-beta-3

joaotavora commented 4 years ago

grigorievich notifications@github.com writes:

The indentation seems to work though.

Yes, because of the constant communication between SLY and Slynk about which things are macros and their argists. The slynk-indentation-cache-thread takes care of this.

What could this be?

Calls to user-defined macros and functions are only highlighted if they start with with-, define-, and check-. Contrary to indentation, the font-locking system does not take note of the nature of the function.

João

some-mthfka commented 4 years ago

Calls to user-defined macros and functions are only highlighted if they start with with-, define-, and check-.

So, wait, is this an established convention / intended choice then or simply a feature not yet implemented? If the latter, please, consider this issue a feature request.

PS I guess I am fine w/ function names not getting highlighted (just as they're not in elisp), but that the macro calls are all greyed out is a tad disheartening : )

joaotavora commented 4 years ago

So, wait, is this an established convention / intended choice then or simply a feature not yet implemented?

It's both.

If the latter, please, consider this issue a feature request.

OK.

some-mthfka commented 4 years ago

I see, alright!