Skip to content

lexical-binding breaks decl-scan #25

@niklas

Description

@niklas

Hemlo!

Since 9a9f550 the function purescript-ds-create-imenu-index throws an error:

Scanning declarations in Helpers.purs... (  0%)
In ‘Imenu’ source: ‘helm-imenu-candidates’ 
 (void-variable index-imp-alist)

With some creative insertion of (message ..) I managed to find the guilty expression: (symbol-value sym) in line 497 (https://github.com/purescript-emacs/purescript-mode/blob/master/purescript-decl-scan.el#L497).

I am still quite a elisp-noob, so I cannot explain why the index-imp-alist variable is void, because I see it initialized in the (let* ..) in line 463ff.

When I remove the lexical-binding: t in the first line of the file, the error disappears and my helm/imenu declaration list is properly populated.

Emacs Versions tested: 26.X, 29.4, 31.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions