]> git.eshelyaron.com Git - kubed.git/commitdiff
; Fix population of 'kubed--columns'
authorEshel Yaron <me@eshelyaron.com>
Mon, 5 Aug 2024 14:23:04 +0000 (16:23 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 5 Aug 2024 14:23:04 +0000 (16:23 +0200)
kubed.el

index 9305d91ba3ff1868b8b984f3df9fbb9725f8d585..97c20e3b4a53c0e5932e56dfdae4db2355c4c29b 100644 (file)
--- a/kubed.el
+++ b/kubed.el
@@ -83,7 +83,7 @@ by default it is `yaml-ts-mode'."
                     nil nil #'equal)
          ,value))
 
-(eval-and-compile (defvar kubed--columns nil))
+(defvar kubed--columns nil)
 
 (defun kubed-update (type context &optional namespace)
   "Update list of resources of type TYPE in CONTEXT and NAMESPACE."
@@ -999,17 +999,18 @@ Other keyword arguments that go between PROPERTIES and COMMANDS are:
           dlt-name (intern (format "kubed-delete-%S"        plrl-var))
           mod-name (intern (format "kubed-%S-mode"          plrl-var))
           ctxt-fun (intern (format "kubed-%S-context-menu"  plrl-var)))
-
-    (setf (alist-get (symbol-name plrl-var) kubed--columns nil nil #'string=)
-          (cons '("NAME:.metadata.name")
-                (mapcar (lambda (p)
-                          (cons (concat (upcase (symbol-name (car p)))
-                                        ":"
-                                        (cadr p))
-                                (nth 4 p)))
-                        properties)))
     ;; Generate code.
     `(progn
+       (setf (alist-get ,(symbol-name plrl-var) kubed--columns nil nil #'string=)
+             (list
+              '("NAME:.metadata.name")
+              ,@(mapcar (lambda (p)
+                          `(cons ,(concat (upcase (symbol-name (car p)))
+                                          ":"
+                                          (cadr p))
+                                 ,(nth 4 p)))
+                        properties)))
+
        (defvar ,hist-var nil
          ,(format "History list for `%S'." read-fun))