|
32 | 32 | ;; the forecast location. |
33 | 33 | ;; |
34 | 34 | ;; 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' |
36 | 36 | ;; to add or modify highlighted periods. |
37 | 37 | ;; |
38 | 38 | ;; 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 |
401 | 401 | "Validate calendar coordinates are set and within valid ranges." |
402 | 402 | (unless (and (boundp 'calendar-latitude) (boundp 'calendar-longitude) |
403 | 403 | (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'")) |
405 | 405 | (unless (and (>= calendar-latitude -90) (<= calendar-latitude 90)) |
406 | 406 | (error "Invalid latitude %s. Must be between -90 and 90" calendar-latitude)) |
407 | 407 | (unless (and (>= calendar-longitude -180) (<= calendar-longitude 180)) |
@@ -480,7 +480,9 @@ Unicode block character visualisation inspired by [[https://www.edwardtufte.com/ |
480 | 480 | #+begin_src emacs-lisp |
481 | 481 | (defun sparkweather--normalize-value (val min-val max-val range) |
482 | 482 | "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." |
484 | 486 | (cond |
485 | 487 | ((and (zerop range) (zerop max-val)) 0) |
486 | 488 | ((zerop range) 4) |
@@ -590,7 +592,7 @@ Create table entries from prepared window data. |
590 | 592 | #+begin_src emacs-lisp |
591 | 593 | (defun sparkweather--display-window-entry (window-plist) |
592 | 594 | "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." |
594 | 596 | (let ((name (plist-get window-plist :name)) |
595 | 597 | (face (plist-get window-plist :face)) |
596 | 598 | (info (plist-get window-plist :weather-info))) |
@@ -621,7 +623,7 @@ Returns (temps precip-probs temp-min temp-max precip-max rainy-codes)." |
621 | 623 |
|
622 | 624 | (defun sparkweather--create-entries (data current-hour windows) |
623 | 625 | "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'." |
625 | 627 | (pcase-let* ((`(,temps ,precip-probs ,temp-min ,temp-max ,precip-max ,rainy-codes) |
626 | 628 | (sparkweather--calculate-ranges data)) |
627 | 629 | (`(,window-data ,highlights) |
|
0 commit comments