From ec1619e047092aeadefc42febf98e94f4b266dd3 Mon Sep 17 00:00:00 2001 From: Kinneyzhang Date: Mon, 5 Jan 2026 17:43:34 +0800 Subject: [PATCH] update --- tp.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tp.el b/tp.el index d561ea3..4df620f 100644 --- a/tp.el +++ b/tp.el @@ -968,14 +968,16 @@ NEW-OBJECT is the new string object (only different for strings with tp-text)." ((stringp tp-text-val) ;; Apply transform if layer has one registered (let* ((layer-name (plist-get props 'tp-name)) - (transform-fn (when layer-name (cdr (assoc layer-name tp-layer-transforms)))) - (final-text (if transform-fn - (condition-case err - (funcall transform-fn tp-text-val) - (error - (message "tp: transform error for %s: %s" layer-name err) - tp-text-val)) - tp-text-val))) + (transform-fn (when layer-name + (cdr (assoc layer-name tp-layer-transforms)))) + (final-text + (if transform-fn + (condition-case err + (funcall transform-fn tp-text-val) + (error + (message "tp: transform error for %s: %s" layer-name err) + tp-text-val)) + tp-text-val))) (if (stringp object) ;; For strings: create a new string with tp-text content ;; The new string replaces the original, with props applied