Closed taku0 closed 1 year ago
@monnier
Why did you delete :group
from customizations?
Maybe
with-eval-after-load
would avoid the duplication?
package-lint
warns any use of with-eval-after-load
, so I didn't use it.
taku0 [2022-09-18 08:17:32] wrote:
- Why did you delete
:group
from customizations?
Those were redundant (:group
is only needed when the group is
different from the last group defined, so for the usual case of a file
that defines exactly one group, the :group
is not needed unless you
want your var to appear in another group).
Maybe
with-eval-after-load
would avoid the duplication?package-lint
warns any use ofwith-eval-after-load
, so I didn't use it.
I don't see why with-eval-after-load
would be considered worse than
what you're currently using.
AFAIK the main problem with (with-)eval-after-work
was when you pass
it a string (file name) rather than a symbol (feature name). But you'd
have to ask the author of package-lint
to know why his tool flags that.
Stefan
The description in the Elisp manual: https://www.gnu.org/software/emacs/manual/html_node/elisp/Hooks-for-Loading.html The rule of the linter: https://github.com/purcell/package-lint/blob/70529b2ecba5f3a037be8b2c6ecbca769c64b00e/package-lint.el#L632-L638 The author's opinion: https://github.com/purcell/package-lint/issues/125#issuecomment-602902003
Possible options:
swift-mode-speedbar
package; it sounds futile.package-lint
; heavy odds.with-eval-after-load
and ignore the warning; swift-mode
already suppresses some warnings, but it might be overdone.package-lint
with fboundp
and add-hook
; ugly but just works.So I will keep the current code for now.
I have deleted redundant :group
attributes. Merging now. Thank you.
taku0 [2022-09-18 23:07:26] wrote:
The description in the Elisp manual: https://www.gnu.org/software/emacs/manual/html_node/elisp/Hooks-for-Loading.html The rule of the linter: https://github.com/purcell/package-lint/blob/70529b2ecba5f3a037be8b2c6ecbca769c64b00e/package-lint.el#L632-L638 The author's opinion: https://github.com/purcell/package-lint/issues/125#issuecomment-602902003
I just added a comment to that package-lint issue, thanks.
Possible options:
- Make
swift-mode-speedbar
package; it sounds futile.
And won't help.
- Persuade the author of
package-lint
; heavy odds.
:-)
- Use
with-eval-after-load
and ignore the warning;swift-mode
already suppresses some warnings, but it might be overdone.- Elude
package-lint
withfboundp
andadd-hook
; ugly but just works.So I will keep the current code for now.
Fair enough. If I were you, I'd add a short comment explaining why
we're not using with-eval-after-load
.
Stefan
@monnier The bugs related to autoloads are fixed in 29.1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58015. Thank you.
test/swift-files/imenu/imenu-expected.el
totest/swift-files/imenu/imenu-expected.eld
since it only contains data rather than code.Co-authored-by: @monnier