gptel: Silence byte-compilation warnings#657
Conversation
|
Thanks. I think I fixed the gptel-rewrite warnings. For the rest I would like to figure out why the byte-compiler thinks the docstrings of the |
https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-09/msg00713.html |
Emacs 28 is lacking the Lines 363 to 369 in 5d5610d |
To clarify: (car (last (split-string (documentation 'gptel-make-azure) "\n" t)))
==> "(fn NAME &key CURL-ARGS HOST (PROTOCOL \"https\") (HEADER (lambda nil `((\"api-key\" \\, (gptel--get-api-key))))) (KEY 'gptel-api-key) MODELS STREAM ENDPOINT REQUEST-PARAMS)"
(length (car (last (split-string (documentation 'gptel-make-azure) "\n" t))))
==> 168
If I set I believe this issue should go away in future versions of Emacs where the internal docstring presentation of macros will be wrapped, if I understand the emacs-devel thread correctly. |
c477924 to
ecc4a09
Compare
Ah, thanks for the link. That explains it. The reason I didn't merge it immediately is that I wasn't sure what What does "other stylistic issues" mean? Is that something we should care about? |
I'm not entirely sure; it seems that |
|
I agree with setting |
|
I don't think setting variables in |
I tested it out. Whether it works depends on how byte-compilation is invoked. So it depends on how each package manager handles it. |
|
Let's just add it to all the files defining cl-structures, i.e. to all the backend libraries. |
|
Also, MELPA does not ship the .git-ignore.el file at all (unlike NonGNU-ELPA). |
3d822ee to
2dfdf96
Compare
* gptel-antropic (gptel--anthropic-models): Use URL format recognized by `describe-variable` in docstring. * gptel-anthropic.el (gptel-make-anthropic): Silence warnings about docstring (created by a macro) wider than 80 characters with local variable. (See Emacs bug#65790.) * gptel-kaqi.el (gptel--wrap-user-prompt): Ditto. * gptel-openai.el: (gptel-make-azure): Ditto. * gptel-openai-extras.el (gptel-make-perplexity): Ditto. * gptel-ollama.el (gptel--wrap-user-prompt): Wrap a docstring line to less than 80 characters. * gptel-org.el (gptel-org--element-lineage-map): Silence warnings about `org-element-type-p' and `org-element-parent', see karthink#294.
2dfdf96 to
289a5cc
Compare
|
Thanks for the PR @pabl0! |
Silence most low-hanging-fruit byte compilation warnings.
https://gist.github.com/pabl0/b48d221ab50914dc1cbf1196efca82d6
I think these might be real issues needing fixing?
Emacs 29.4:
Emacs 28.2: