Skip to content

atoms and variables not highlighted when containing an underscore #2

@EWurbel

Description

@EWurbel

When using underscores in atoms or variables, there is no highlighting.

I suspect it is because of the presence of the underscore in the pasp--constructs regexp. I suppose that you added the underscore in this regexp in order to take into account anonymous variables. The problem is that this regexp is matched before the regexp for atoms and variables.

One possible workaround (which I use) is:

  • remove the underscore from the pasp--constructs regexp
  • modify pasp--variable as follows:
(defconst pasp--variable
  '("_*\\([[:upper:]][[:word:]_']*\\)*" . font-lock-variable-name-face)
  "ASP variable.")

With this modification, anonymous variables are highlighted just like other variables.

A side question is: I don't understand what is the intent of the pasp--variable2. What ASP construct do you catch with it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions