Address linting errors and restore support for Emacs <28 #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The errors in question
Each commit in this PR fixes a class of issues. This PR also turns on
lexical-binding
. Ths issues are:7d9054e string-replace was added in Emacs 28, so up until now this package only worked on Emacs 28 or above. This could be fixed by:
I chose to depend on s.el because (a) it's on MELPA as well, (b) this package was already copying s-blank? inline (as
s-blank
, with the wrong package prefix), and (c) there is no need to drop Emacs pre-28 here.I replaced the
s-blank
function previously defined by this package withs-blank?
from s.el, andstring-replace
withs-replace
.c3ecb78 Package should have a Homepage or URL header. Previously this package was using a nonstandard "Website" header.
8bd143e 2b25d09 Docstrings should:
*Help*
pages)Moreover, there is a strong nudge to add docstrings to all functions and variables. There was just one function without a docstring, so I wrote one for it.
The parentheses and indentation style should also be updated to be more conventional for Emacs Lisp, to make it less painful to edit without introducing lots of style noise. That is not in scope of this PR though, to make this PR easier to review.