Skip to content

Commit 88af2ea

Browse files
committed
Fix: Address checkdoc warnings
I'd forgotten that double spaces at the end of sentences were manatory; also some long lines, unescaped things and other misc crimes. Whoops.
1 parent 7564acd commit 88af2ea

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

sparkweather.el

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
;; the forecast location.
4242
;;
4343
;; The sparkline display highlights configurable time windows,
44-
;; such as lunch and commute hours. Customize `sparkweather-time-windows'
44+
;; such as lunch and commute hours. Customize `sparkweather-time-windows'
4545
;; to add or modify highlighted periods.
4646
;;
4747
;; Weather icons use Unicode weather glyphs from the Miscellaneous
@@ -368,7 +368,7 @@ STATUS is the `url-retrieve` status parameter."
368368
"Validate calendar coordinates are set and within valid ranges."
369369
(unless (and (boundp 'calendar-latitude) (boundp 'calendar-longitude)
370370
(numberp calendar-latitude) (numberp calendar-longitude))
371-
(error "Calendar location not set. Set `calendar-latitude' and `calendar-longitude'"))
371+
(error "Calendar location not set. Set `calendar-latitude' and `calendar-longitude'"))
372372
(unless (and (>= calendar-latitude -90) (<= calendar-latitude 90))
373373
(error "Invalid latitude %s. Must be between -90 and 90" calendar-latitude))
374374
(unless (and (>= calendar-longitude -180) (<= calendar-longitude 180))
@@ -427,7 +427,9 @@ and all-indices is combined highlight indices from all windows."
427427

428428
(defun sparkweather--normalize-value (val min-val max-val range)
429429
"Normalise VAL to 0-7 for sparkline character selection.
430-
Handles edge cases: all-zero data uses floor, constant data uses mid-height."
430+
MIN-VAL and MAX-VAL define the data range, RANGE is their difference.
431+
Handles edge cases: all-zero data uses floor, constant data uses
432+
mid-height."
431433
(cond
432434
((and (zerop range) (zerop max-val)) 0)
433435
((zerop range) 4)
@@ -516,7 +518,7 @@ timestamp/location line."
516518

517519
(defun sparkweather--display-window-entry (window-plist)
518520
"Create table entry from WINDOW-PLIST.
519-
Returns (symbol vector) for tabulated-list-entries, or nil if no weather info."
521+
Returns (symbol vector) for `tabulated-list-entries', or nil if no weather info."
520522
(let ((name (plist-get window-plist :name))
521523
(face (plist-get window-plist :face))
522524
(info (plist-get window-plist :weather-info)))
@@ -543,7 +545,7 @@ Returns (temps precip-probs temp-min temp-max precip-max rainy-codes)."
543545

544546
(defun sparkweather--create-entries (data current-hour windows)
545547
"Create table entries for DATA, highlighting CURRENT-HOUR and WINDOWS.
546-
Returns list of entries for tabulated-list-mode."
548+
Returns list of entries for `tabulated-list-mode'."
547549
(pcase-let* ((`(,temps ,precip-probs ,temp-min ,temp-max ,precip-max ,rainy-codes)
548550
(sparkweather--calculate-ranges data))
549551
(`(,window-data ,highlights)

sparkweather.org

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
;; the forecast location.
3333
;;
3434
;; The sparkline display highlights configurable time windows,
35-
;; such as lunch and commute hours. Customize `sparkweather-time-windows'
35+
;; such as lunch and commute hours. Customize `sparkweather-time-windows'
3636
;; to add or modify highlighted periods.
3737
;;
3838
;; Weather icons use Unicode weather glyphs from the Miscellaneous
@@ -401,7 +401,7 @@ Request [[https://open-meteo.com/en/docs][forecast from Open-Meteo]] using coord
401401
"Validate calendar coordinates are set and within valid ranges."
402402
(unless (and (boundp 'calendar-latitude) (boundp 'calendar-longitude)
403403
(numberp calendar-latitude) (numberp calendar-longitude))
404-
(error "Calendar location not set. Set `calendar-latitude' and `calendar-longitude'"))
404+
(error "Calendar location not set. Set `calendar-latitude' and `calendar-longitude'"))
405405
(unless (and (>= calendar-latitude -90) (<= calendar-latitude 90))
406406
(error "Invalid latitude %s. Must be between -90 and 90" calendar-latitude))
407407
(unless (and (>= calendar-longitude -180) (<= calendar-longitude 180))
@@ -480,7 +480,9 @@ Unicode block character visualisation inspired by [[https://www.edwardtufte.com/
480480
#+begin_src emacs-lisp
481481
(defun sparkweather--normalize-value (val min-val max-val range)
482482
"Normalise VAL to 0-7 for sparkline character selection.
483-
Handles edge cases: all-zero data uses floor, constant data uses mid-height."
483+
MIN-VAL and MAX-VAL define the data range, RANGE is their difference.
484+
Handles edge cases: all-zero data uses floor, constant data uses
485+
mid-height."
484486
(cond
485487
((and (zerop range) (zerop max-val)) 0)
486488
((zerop range) 4)
@@ -590,7 +592,7 @@ Create table entries from prepared window data.
590592
#+begin_src emacs-lisp
591593
(defun sparkweather--display-window-entry (window-plist)
592594
"Create table entry from WINDOW-PLIST.
593-
Returns (symbol vector) for tabulated-list-entries, or nil if no weather info."
595+
Returns (symbol vector) for `tabulated-list-entries', or nil if no weather info."
594596
(let ((name (plist-get window-plist :name))
595597
(face (plist-get window-plist :face))
596598
(info (plist-get window-plist :weather-info)))
@@ -621,7 +623,7 @@ Returns (temps precip-probs temp-min temp-max precip-max rainy-codes)."
621623

622624
(defun sparkweather--create-entries (data current-hour windows)
623625
"Create table entries for DATA, highlighting CURRENT-HOUR and WINDOWS.
624-
Returns list of entries for tabulated-list-mode."
626+
Returns list of entries for `tabulated-list-mode'."
625627
(pcase-let* ((`(,temps ,precip-probs ,temp-min ,temp-max ,precip-max ,rainy-codes)
626628
(sparkweather--calculate-ranges data))
627629
(`(,window-data ,highlights)

0 commit comments

Comments
 (0)