Closed grtcdr closed 1 month ago
I found out that denote-get-identifier-at-point
is an unused function through xref-find-references
so you might consider removing it if no one's making use of it (which is hard to know for me).
This is fine and I am happy to merge it. Which version of Emacs are you using? I do not get these warnings on my end...
consider removing it if no one's making use of it (which is hard to know for me).
I know at least one case of someone using it. But we may want to think of how best to organise our files to decide where is the best place to put these sort of functions.
Yeah, I should've mentioned I was on version 29.4
, if my changes don't cause noise on older versions of Emacs then I'd consider it safe to roll out.
By the way, you can find instances of this approach in built-in packages (see function tramp-accept-process-output
for example), so it's safe to assume that it is backwards-compatible to some degree -- although to what degree I am not sure.
Merged, thank you!
I remember the standard approach of when-let
to be like this:
(when-let (((stringp a))
(one a))
BODY)
We have those cases in the Denote source code. Though I do not get any errors on my end with this approach (Emacs 31, but I believe it also worked on Emacs 30):
(when-let ((_ (stringp a))
(one a))
BODY)
The latter seems more readable to me, but I will not argue with the byte compiler.
I noticed some warnings pop up during a reinstallation of Denote and went and fixed them.
Here are the errors for reference:
Unlike
pcase
which holds a special meaning for_
, there's no way to mark a let-bound variable as ignored but we can omit the SYMBOL name from the VARLIST and thewhen-let
expression will still evaluate correctly.