summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-17 17:45:39 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-17 17:45:39 -0400
commitadbd52f8f58b65416d2a12df4682eb79aaf9b9c7 (patch)
tree9828aa287b168d6aaad3659a5129ec5e6b3f261d
parent016e48cfd3146ed32c55ce331d880d01cf5af802 (diff)
downloademacsconf-el-adbd52f8f58b65416d2a12df4682eb79aaf9b9c7.tar.xz
emacsconf-el-adbd52f8f58b65416d2a12df4682eb79aaf9b9c7.zip
Don't reuse list constants
Diffstat (limited to '')
-rw-r--r--emacsconf-schedule.el60
1 files changed, 32 insertions, 28 deletions
diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el
index 630ae61..9b90faa 100644
--- a/emacsconf-schedule.el
+++ b/emacsconf-schedule.el
@@ -236,32 +236,35 @@ Each function should take the info and manipulate it as needed, returning the ne
(y base-y)
(node (dom-node
'rect
- `((x . ,x)
- (y . ,y)
- (opacity . "0.8")
- (width . ,size)
- (height . ,(1- height))
- (stroke . "black")
- (stroke-dasharray .
- ,(if (string-match "live" (or (plist-get o :q-and-a) "live"))
- ""
- "5,5,5"
- ))
- (fill . ,(cond
- ((string-match "BREAK\\|LUNCH" (plist-get o :title)) "white")
- ((plist-get o :invalid) "red")
- ((string-match "EST"
- (or (plist-get o :availability) ""))
- "lightgray")
- (t "lightgreen"))))))
+ (list
+ (cons 'x x)
+ (cons 'y y)
+ (cons 'opacity "0.8")
+ (cons 'width size)
+ (cons 'height (1- height))
+ (cons 'stroke "black")
+ (cons 'stroke-dasharray
+ (if (string-match "live" (or (plist-get o :q-and-a) "live"))
+ ""
+ "5,5,5"))
+ (cons 'fill
+ (cond
+ ((string-match "BREAK\\|LUNCH" (plist-get o :title)) "white")
+ ((plist-get o :invalid) "red")
+ ((string-match "EST"
+ (or (plist-get o :availability) ""))
+ "lightgray")
+ (t "lightgreen"))))))
(parent (dom-node
'a
- `((href . ,(concat "/" (plist-get o :url)))
- (title . ,(plist-get o :title)))
+ (list
+ (cons 'href (concat "/" (plist-get o :url)))
+ (cons 'title (plist-get o :title))
+ (cons 'data-slug (plist-get o :slug)))
(dom-node 'title nil
- (concat (format-time-string "%l:%M-" (plist-get o :start-time) emacsconf-timezone)
- (format-time-string "%l:%M " (plist-get o :end-time) emacsconf-timezone)
- (plist-get o :title)))
+ (concat (format-time-string "%l:%M-" (plist-get o :start-time) emacsconf-timezone)
+ (format-time-string "%l:%M " (plist-get o :end-time) emacsconf-timezone)
+ (plist-get o :title)))
node
(dom-node
'g
@@ -269,11 +272,12 @@ Each function should take the info and manipulate it as needed, returning the ne
(+ x size -2) (+ y height -2))))
(dom-node
'text
- '((fill . "black")
- (x . 0)
- (y . 0)
- (font-size . 10)
- (transform . "rotate(-90)"))
+ (list
+ (cons 'fill "black")
+ (cons 'x 0)
+ (cons 'y 0)
+ (cons 'font-size 10)
+ (cons 'transform "rotate(-90)"))
(svg--encode-text (or (plist-get o :slug) (plist-get o :title))))))))
(run-hook-with-args
'emacsconf-schedule-svg-modify-functions