From fc4a36ba2b85749a01010950b72f04477209b192 Mon Sep 17 00:00:00 2001 From: Kinneyzhang Date: Thu, 6 Aug 2026 03:58:39 +0800 Subject: [PATCH] refactor(tp): decouple retained core from dash Replace the two Dash list helpers in tp-core with cl-lib primitives so tp-surface can load through its minimal public module chain. The legacy facade continues to declare Dash for layer and stack APIs. Verified: standalone tp-surface load without Dash, 718 ERT tests, WERROR compile-all, and git diff --check. --- tp-core.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tp-core.el b/tp-core.el index 7292613..1c59b6f 100644 --- a/tp-core.el +++ b/tp-core.el @@ -21,7 +21,6 @@ ;;; Code: (require 'cl-lib) -(require 'dash) (require 'seq) (require 'text-property-search) @@ -866,8 +865,9 @@ Returns the list of FUNCTION's non-nil results, in interval order (interval-end (nth 1 tp)) (interval-props (nth 2 tp)) (top-props - (if-let ((idx (-elem-index 'tp-layers interval-props))) - (-remove-at-indices (list idx (1+ idx)) interval-props) + (if-let ((idx (cl-position 'tp-layers interval-props))) + (append (cl-subseq interval-props 0 idx) + (nthcdr (+ idx 2) interval-props)) interval-props)) (below-props-lst (plist-get interval-props 'tp-layers))) (funcall function