Address most Emacs 29 warnings
Fixes https://github.com/clojure-emacs/cider/issues/3606
Addresses indentation and other warnings.
Sadly we cannot immediately upgrade the CI linting, because:
- Emacs 29 deprecates lax-plist-* functions
- The alternative is based on an arity that isn't present in Emacs < 29.
Similarly, xref-go-back deprecates xref-pop-marker-stack, while the former only exists on Emacs 29, so there's no possible fix, AFAIK.
However, a great deal of warnings is now fixed, which should be less noisy to users, and pave the path future refinements.
Cheers - V
Similarly, xref-go-back deprecates xref-pop-marker-stack, while the former only exists on Emacs 29, so there's no possible fix, AFAIK.
Normally in such cases I copied stuff from the newer Emacs into cider-compat.el. (not sure if it currently exists) Backporting newer code is the only reasonable solution in such cases IMO.
I noticed that many of the changes are related to thread-first/last and cl-labels? Did they change their indentation settings? Seems like a pretty weird upstream change if so.
I just saw this in the Emacs 29 changelog:
Indentation of 'cl-flet' and 'cl-labels' has changed.
These forms now indent like this:
(cl-flet ((bla (x)
(* x x)))
(bla 42))
This change also affects 'cl-macrolet', 'cl-flet*' and
'cl-symbol-macrolet'.
- Emacs 29 deprecates lax-plist-* functions
- The alternative is based on an arity that isn't present in Emacs < 29.
IIUC it's possible to just replace lax-plist-get/put with plist-get/put.
plist-get/put got an optional 3rd argument in emacs29+ but with 2 arguments they behave the same as lax-plist-*
(Edit: Not exactly the same but similar. lax-plist-get uses equal for comparison and plist-get uses eq. https://www.gnu.org/software/emacs/manual/html_node/elisp/Plist-Access.html)
Edit2: I was wrong. plist-* fns cannot be used as a direct replacement when the keys are strings. Some alternatives solutions are using compat29.1 lib or replacing all plists to use keywords as keys.
Edit: Not exactly the same but similar. lax-plist-get uses equal for comparison and plist-get uses eq.
It may have been that prevented me from using a direct fix - I recall trying something and see the builds fail for E<29
I'll re-take this PR in March