Closed ag91 closed 3 years ago
By the way, it may interest you to see the code churn (line of codes added and deleted) of last few months: most of my code is tests luckily :)
I can do that. A bit of a problem is that tracking-max-mode-line-entries can be nil and the = operator fails for that.
Do you know if there is something better than
(or (or (null tracking-max-mode-line-entries)) (= tracking-max-mode-line-entries 0)) ...)
to handle this case? I chose eq because it works for integers and I do not expect users to use 0.0 in there.
On Fri 18 Sep 2020 at 23:05, Vasilij Schneidermann notifications@github.com wrote:
@wasamasa commented on this pull request.
@@ -340,7 +340,7 @@ to be ignored." This returns a list suitable for
mode-line-format'. If
tracking-max-mode-line-entries' is a positive integer, only return that many entries, ending with '+n'."
- (if (not tracking-buffers)
- (if (or (eq tracking-max-mode-line-entries 0) (not tracking-buffers))
Please use
=
for numerical comparison.
How about (or (and tracking-max-mode-line-entries (= tracking-max-mode-line-entries 0)) (not tracking-buffers))
. And no, eq
tests for object identity, so I'd expect it to fail on bignums (the core developers might have hacked around that though due to the sheer number of code misusing eq
for number/character comparison).
Thanks!
Solves #378 @wasamasa I never contributed to this repository before, let me know if you would like some refactoring to match your standards.