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

Enhance the describe-mode and more document #16401

Merged
merged 1 commit into from
May 15, 2024

Conversation

sunlin7
Copy link
Contributor

@sunlin7 sunlin7 commented May 14, 2024

Hi,
This PR is try to make more simple code for describe-mode, and more document for it.

Originally posted by @sunlin7 in #16397 (comment)

The helm has special code to deal the describe-mode:
https://github.com/emacs-helm/helm/blob/6d23a65ca6bcb6c0ea6f21f3cf2e58f8570ef75b/helm-core.el#L479-L481

(defvar helm-map
;;...
    (define-key map (kbd "M-m")        #'helm-toggle-all-marks)
;;...
    ;; Use `describe-mode' key in `global-map'.
    (dolist (k (where-is-internal #'describe-mode global-map))
      (define-key map k #'helm-help))
;;...

If arranged the describe-mode with key "M-m ..." before helm, the issue will be triggered.
Thanks

@smile13241324
Copy link
Collaborator

Is this still necessary? And can @fnussbaum have a quick look also given that this touches his recent fix?

@sunlin7
Copy link
Contributor Author

sunlin7 commented May 15, 2024

Hi @smile13241324
It makes the code simple and more document for future readers.

@fnussbaum
Copy link
Contributor

I see no harm in applying this patch. That being said, I think the reason for the alias is sufficiently documented in the comment above it. I deliberately chose to turn the docstring from the workaround in the ivy layer into a comment because this makes describe-key SPC hdm immediately show the documentation of describe-mode (while also clearly mentioning that it is aliased). I assumed people curious about the alias would look into the source or even the vc-region-history, it mostly does not matter to end users I think. But if a docstring is preferred, that would of course be fine too.

Removing the condition on Helm being used is also okay, as I said before, I just subjectively prefer not defining an unnecessary alias when Helm is not used.

@sunlin7 I believe the cleanest solution would involve fixing the underlying issue in Helm and completely removing the alias. So maybe it would make sense to report this upstream, but that is not a high priority for me.

@sunlin7
Copy link
Contributor Author

sunlin7 commented May 15, 2024 via email

@smile13241324 smile13241324 merged commit c6deea0 into syl20bnr:develop May 15, 2024
7 of 8 checks passed
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.

None yet

3 participants