Address code review comments: improve comments clarity

Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-28 16:44:20 +00:00
parent a24bd264c1
commit 31ccbb6924

13
tp.el
View File

@ -2485,12 +2485,10 @@ For group names, includes `tp-layers' property with the full layer stack."
;; Parameterized layer - evaluate with the argument ;; Parameterized layer - evaluate with the argument
((tp-layer-parameterized-p first-elem) ((tp-layer-parameterized-p first-elem)
(tp-layer-props-with-arg first-elem second-elem)) (tp-layer-props-with-arg first-elem second-elem))
;; Non-parameterized layer - arg should be t, just return the layer props ;; Non-parameterized layer - arg should be t, return the layer props
;; (silently ignore non-t values for flexibility)
((assoc first-elem tp-layer-alist) ((assoc first-elem tp-layer-alist)
(if (eq second-elem t) (tp-layer-props first-elem))
(tp-layer-props first-elem)
;; If not t, treat as parameterized but layer isn't - error or return nil
(tp-layer-props first-elem)))
;; Layer group ;; Layer group
((assoc first-elem tp-layer-groups) ((assoc first-elem tp-layer-groups)
(when-let ((layer-props-list (tp-group-props first-elem))) (when-let ((layer-props-list (tp-group-props first-elem)))
@ -2528,11 +2526,8 @@ For group names, includes `tp-layers' property with the full layer stack."
;; Symbol - check if it's a layer or group name ;; Symbol - check if it's a layer or group name
((symbolp props) ((symbolp props)
(cond (cond
;; Check parameterized layer first - but without argument, we can't resolve it ;; Parameterized layer without argument - cannot resolve, return nil
;; Just check if it's a known layer name
((tp-layer-parameterized-p props) ((tp-layer-parameterized-p props)
;; Parameterized layer without argument - return nil or error
;; For now, return nil - caller should provide argument
nil) nil)
;; Check layer - use tp-layer-props which adds tp-name ;; Check layer - use tp-layer-props which adds tp-name
((assoc props tp-layer-alist) ((assoc props tp-layer-alist)