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.
This commit is contained in:
Kinneyzhang 2026-08-06 03:58:39 +08:00
parent e3d7d1dfc6
commit fc4a36ba2b

View File

@ -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