Skip to content

Conversation

@kisaragi-hiu
Copy link
Contributor

@kisaragi-hiu kisaragi-hiu commented Jul 7, 2022

An unbound symbol can still have symbol properties. Without this, it is painful to eg. look for where a button type or a face is defined.

The way I merged the display of unbound symbols into the rest of helpful-update is... quite inelegant, but avoiding that would require rearchitecting helpful-update to delegate to different "views" instead, so I've opted to not do that for now.

20220707T220308+0900

  • helpful--kind-name

    Return "unbound symbol" for symbols that are neither bound as variables or functions.

    Also added this case to its unit test.

  • helpful--summary

    Add support for unbound symbols. They are rendered like this: "epg-error is an unbound symbol."

  • helpful--bound-p

    Return non-nil for a lambda instead of erroring out.

  • helpful-unbound-symbol

    New command. Functionally the same as helpful-variable when called from Lisp, but offers only unbound symbols with properties for completion.

  • helpful-symbol

    Call helpful-unbound-symbol for unbound symbols.

  • helpful--update

    Add support for unbound symbols.

  • helpful--format-references-to-unbound

    New function. This returns the text for the references section. Because unbound symbols do not have symbol-file, this unfortunately has to resort to searching every loaded file with elisp-refs.

  • CHANGELOG.md

    Add entry for this change.

@kisaragi-hiu kisaragi-hiu force-pushed the helpful-unbound-symbol branch from e67b8a4 to b7ac0e2 Compare July 7, 2022 13:34
An unbound symbol can still have symbol properties. Without this, it
is painful to look for eg. where a button type or a face is defined.

(helpful--kind-name):
  Return "unbound symbol" for symbols that are neither bound as
  variables or functions.

  Also added this case to its unit test.

(helpful--summary):
  Add support for unbound symbols. They are rendered like this:
  "epg-error is an unbound symbol."

(helpful--bound-p):
  Return non-nil for a lambda instead of erroring out.

(helpful-unbound-symbol):
  New command. Functionally the same as helpful-variable when called
  from Lisp, but offers only unbound symbols with properties for
  completion.
(helpful-symbol):
  Call helpful-unbound-symbol for unbound symbols.
(helpful--update):
  Add support for unbound symbols.
(helpful--format-references-to-unbound):
  New function. This returns the text for the references section.
  Because unbound symbols do not have symbol-file, this unfortunately
  has to resort to searching every loaded file with elisp-refs.

(CHANGELOG.md): Add entry for this change.
@kisaragi-hiu kisaragi-hiu force-pushed the helpful-unbound-symbol branch from b7ac0e2 to 492a871 Compare July 7, 2022 13:34
slotThe pushed a commit to slotThe/helpful that referenced this pull request Oct 5, 2023
NOTE: This is Wilfred#299

An unbound symbol can still have symbol properties. Without this, it
is painful to look for eg. where a button type or a face is defined.

(helpful--kind-name):
  Return "unbound symbol" for symbols that are neither bound as
  variables or functions.

  Also added this case to its unit test.

(helpful--summary):
  Add support for unbound symbols. They are rendered like this:
  "epg-error is an unbound symbol."

(helpful--bound-p):
  Return non-nil for a lambda instead of erroring out.

(helpful-unbound-symbol):
  New command. Functionally the same as helpful-variable when called
  from Lisp, but offers only unbound symbols with properties for
  completion.
(helpful-symbol):
  Call helpful-unbound-symbol for unbound symbols.
(helpful--update):
  Add support for unbound symbols.
(helpful--format-references-to-unbound):
  New function. This returns the text for the references section.
  Because unbound symbols do not have symbol-file, this unfortunately
  has to resort to searching every loaded file with elisp-refs.

(CHANGELOG.md): Add entry for this change.
slotThe pushed a commit to slotThe/helpful that referenced this pull request Jan 5, 2026
NOTE: This is Wilfred#299

An unbound symbol can still have symbol properties. Without this, it
is painful to look for eg. where a button type or a face is defined.

(helpful--kind-name):
  Return "unbound symbol" for symbols that are neither bound as
  variables or functions.

  Also added this case to its unit test.

(helpful--summary):
  Add support for unbound symbols. They are rendered like this:
  "epg-error is an unbound symbol."

(helpful--bound-p):
  Return non-nil for a lambda instead of erroring out.

(helpful-unbound-symbol):
  New command. Functionally the same as helpful-variable when called
  from Lisp, but offers only unbound symbols with properties for
  completion.
(helpful-symbol):
  Call helpful-unbound-symbol for unbound symbols.
(helpful--update):
  Add support for unbound symbols.
(helpful--format-references-to-unbound):
  New function. This returns the text for the references section.
  Because unbound symbols do not have symbol-file, this unfortunately
  has to resort to searching every loaded file with elisp-refs.

(CHANGELOG.md): Add entry for this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant