Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support viewing help for unbound symbols #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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 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.
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