sly icon indicating copy to clipboard operation
sly copied to clipboard

user-defined macro/function names are not highlighted

Open some-mthfka opened this issue 4 years ago • 4 comments

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

some-mthfka avatar Jul 18 '20 15:07 some-mthfka

grigorievich [email protected] 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

joaotavora avatar Jul 18 '20 19:07 joaotavora

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

some-mthfka avatar Jul 19 '20 19:07 some-mthfka

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.

joaotavora avatar Jul 20 '20 12:07 joaotavora

I see, alright!

some-mthfka avatar Jul 20 '20 16:07 some-mthfka