Emacs Help Mode#2240
Conversation
ℹ️ 1 violation(s) dismissed 💬 Feedback Reply to a violation comment with:
📚 About Code ContractorDeclarative Code Standards That Learn and Improve Define domain-specific validation rules in YAML. Want this for your repo? |
| (:use #:cl #:lem)) | ||
| (in-package #:lem-emacs-help-mode) | ||
|
|
||
| (defvar *previous-ctrl-h-suffix* nil) |
There was a problem hiding this comment.
Code Contractor: functional_style_rule
Contract: contract
AI check failed: "functional_style_rule"
Reason:
Added code introduces dynamic global state via defvar to pass state between enable/disable operations, which this rule discourages outside well-documented exceptions.
💬 Reply /dismiss <reason> to dismiss this violation.
|
@vindarel Could you give me some assistance on how to globally rebind EDIT: I just decided to try using minor-mode-keymap and see if that did what I wanted, and it seemed to do so. |
| :list-modes) | ||
| :list-modes | ||
| :describe-all-modes | ||
| :*describe-output-type-override*) |
There was a problem hiding this comment.
Is it really necessary (for end users) to export this variable? You can access it with ::.
There was a problem hiding this comment.
If you do mean Lem users can use it (to have help text in buffers rather than popups for instance), I'd push for a better name.
Also, what about giving prefix arguments to the interactive commands, to change the output type?
There was a problem hiding this comment.
I meant for it to be customizable for lem users yes. If you have any better name suggestions I would be happy to hear them, I had a lot of trouble naming this variable.
As to prefix arguments, I'm not sure what would be involved for that, do you mean prefix arguments like how you can do C-u M-x foo in emacs to give extra arguments for the command?
There was a problem hiding this comment.
not easy… documentation-output ?
yes I mean prefix arguments like this. The use could be: M-x describe-lem-variables uses the default documentation-output, say the popup. Now calling C-u 1 M-x … would use a :buffer. (maybe not a great idea, usability-wise)
Other idea: to have a command that changes the default output. For ex: M-x set-documentation-output RET buf <TAB> -> buffer RET -> changes it to :buffer for the current session. And the value could be serialized in Lem's config (a very easy mechanism I can point if you don't know it yet). WDYT?
There was a problem hiding this comment.
Yes a set-documentation-output command sounds like a good idea. I am not familiar with the serialized config mechanism - where should I look to find how to use it?
| :finally (setf *all-variables-cache* syms))) | ||
| *all-variables-cache*) | ||
|
|
||
| (define-command apropos-variable () () |
There was a problem hiding this comment.
missing docstring
(and also misleading name?)
There was a problem hiding this comment.
Added docs and renamed it to describe-variable
There was a problem hiding this comment.
Hey this command is about lem variables, I suggest renaming with "lem" inside like describe-lem-variable.
Initial work to address #2231
I'm not sure if the only way to do this is to overwrite and restore the
ctrl-hbinding in the global-map or if using a minor mode keymap will help me here. I'd appreciate any advice on whats the best way to replace just a single keybinding prefix like this