Skip to content

Commit 7564acd

Browse files
committed
Fix: Address bytecomp warnings
1 parent b023957 commit 7564acd

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

sparkweather.el

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,19 @@
7777
'(("Lunch" 12 14)
7878
("Commute" 17 19))
7979
"Time windows to highlight in forecast display.
80-
Each window colours a portion of the sparkline and displays the worst weather
81-
for that period.
80+
Each window colours a portion of the sparkline and displays the worst
81+
weather for that period.
8282
83-
Define windows as (NAME START-HOUR END-HOUR) or (NAME START-HOUR END-HOUR FACE) where:
83+
Define windows as (NAME START-HOUR END-HOUR) or
84+
\(NAME START-HOUR END-HOUR FACE) where:
8485
NAME is a string describing the window (e.g., \"Lunch\", \"Commute\")
8586
START-HOUR is the first hour to highlight (0-23)
86-
END-HOUR is the hour to stop before (0-23, not included in the window)
87-
FACE colours the window; defaults to 'success if omitted
87+
END-HOUR is the hour to stop before (0-23, not included)
88+
FACE colours the window; defaults to \\='success if omitted
8889
8990
Examples:
90-
(\"Lunch\" 12 14) highlights hours 12 and 13 with 'success face
91-
(\"Commute\" 17 19 warning) highlights hours 17 and 18 with 'warning face"
91+
(\"Lunch\" 12 14) highlights hours 12 and 13 with \\='success face
92+
(\"Commute\" 17 19 warning) highlights 17 and 18 with \\='warning face"
9293
:type '(repeat (choice
9394
(list (string :tag "Name")
9495
(integer :tag "Start hour (0-23)")
@@ -398,7 +399,7 @@ and weather-codes is a list of WMO codes for that window."
398399
(defun sparkweather--prepare-window (data window)
399400
"Prepare sparkline data for WINDOW from weather DATA.
400401
WINDOW is (name start-hour end-hour) or (name start-hour end-hour face).
401-
If FACE is omitted, defaults to 'success.
402+
If FACE is omitted, defaults to \\='success.
402403
Returns plist with :name :face :indices :weather-info."
403404
(pcase-let* ((`(,name ,start ,end . ,rest) window)
404405
(face (or (car rest) 'success))
@@ -478,7 +479,8 @@ CURRENT-HOUR, if provided, inserts a narrow no-break space before that hour."
478479
(defun sparkweather--format-footer ()
479480
"Generate footer text with timestamp and optional location.
480481
Returns string suitable for insertion at buffer end.
481-
Leading newline provides spacing and allows hiding only timestamp when footer is hidden."
482+
Leading newline provides spacing, allowing hiding of only the
483+
timestamp when footer is hidden."
482484
;; Leading \n creates blank line for visual spacing.
483485
;; sparkweather--window-max-height relies on this to hide only the timestamp line.
484486
(concat "\n" (format-time-string "%A %F %R")
@@ -493,8 +495,9 @@ Leading newline provides spacing and allows hiding only timestamp when footer is
493495

494496
(defun sparkweather--window-max-height (window)
495497
"Calculate maximum height for sparkweather WINDOW.
496-
Returns reduced height when `sparkweather-hide-footer' is enabled, nil otherwise.
497-
Keeps blank line visible as buffer, hiding only timestamp/location line."
498+
Returns reduced height when `sparkweather-hide-footer' is enabled,
499+
nil otherwise. Keeps blank line visible as buffer, hiding only
500+
timestamp/location line."
498501
(when (and sparkweather-add-footer sparkweather-hide-footer)
499502
(with-current-buffer (window-buffer window)
500503
;; Calculate desired body lines (total - 1 to hide timestamp)

sparkweather.org

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,19 @@ Time windows define which hours are highlighted in the sparkline display using t
8484
'(("Lunch" 12 14)
8585
("Commute" 17 19))
8686
"Time windows to highlight in forecast display.
87-
Each window colours a portion of the sparkline and displays the worst weather
88-
for that period.
87+
Each window colours a portion of the sparkline and displays the worst
88+
weather for that period.
8989

90-
Define windows as (NAME START-HOUR END-HOUR) or (NAME START-HOUR END-HOUR FACE) where:
90+
Define windows as (NAME START-HOUR END-HOUR) or
91+
\(NAME START-HOUR END-HOUR FACE) where:
9192
NAME is a string describing the window (e.g., \"Lunch\", \"Commute\")
9293
START-HOUR is the first hour to highlight (0-23)
93-
END-HOUR is the hour to stop before (0-23, not included in the window)
94-
FACE colours the window; defaults to 'success if omitted
94+
END-HOUR is the hour to stop before (0-23, not included)
95+
FACE colours the window; defaults to \\='success if omitted
9596

9697
Examples:
97-
(\"Lunch\" 12 14) highlights hours 12 and 13 with 'success face
98-
(\"Commute\" 17 19 warning) highlights hours 17 and 18 with 'warning face"
98+
(\"Lunch\" 12 14) highlights hours 12 and 13 with \\='success face
99+
(\"Commute\" 17 19 warning) highlights 17 and 18 with \\='warning face"
99100
:type '(repeat (choice
100101
(list (string :tag "Name")
101102
(integer :tag "Start hour (0-23)")
@@ -445,7 +446,7 @@ Prepare time window data for display by combining indices with faces and extract
445446
(defun sparkweather--prepare-window (data window)
446447
"Prepare sparkline data for WINDOW from weather DATA.
447448
WINDOW is (name start-hour end-hour) or (name start-hour end-hour face).
448-
If FACE is omitted, defaults to 'success.
449+
If FACE is omitted, defaults to \\='success.
449450
Returns plist with :name :face :indices :weather-info."
450451
(pcase-let* ((`(,name ,start ,end . ,rest) window)
451452
(face (or (car rest) 'success))
@@ -545,7 +546,9 @@ Footer generation and window height calculation to optionally hide footer lines.
545546
#+begin_src emacs-lisp
546547
(defun sparkweather--format-footer ()
547548
"Generate footer text with timestamp and optional location.
548-
Returns string suitable for insertion at buffer end."
549+
Returns string suitable for insertion at buffer end.
550+
Leading newline provides spacing, allowing hiding of only the
551+
timestamp when footer is hidden."
549552
;; Leading \n creates blank line for visual spacing.
550553
;; sparkweather--window-max-height relies on this to hide only the timestamp line.
551554
(concat "\n" (format-time-string "%A %F %R")
@@ -560,8 +563,9 @@ Returns string suitable for insertion at buffer end."
560563

561564
(defun sparkweather--window-max-height (window)
562565
"Calculate maximum height for sparkweather WINDOW.
563-
Returns reduced height when `sparkweather-hide-footer' is enabled, nil otherwise.
564-
Keeps blank line visible as buffer, hiding only timestamp/location line."
566+
Returns reduced height when `sparkweather-hide-footer' is enabled,
567+
nil otherwise. Keeps blank line visible as buffer, hiding only
568+
timestamp/location line."
565569
(when (and sparkweather-add-footer sparkweather-hide-footer)
566570
(with-current-buffer (window-buffer window)
567571
;; Calculate desired body lines (total - 1 to hide timestamp)

0 commit comments

Comments
 (0)