diff --git a/tp.el b/tp.el index 391b4e6..99c8f94 100644 --- a/tp.el +++ b/tp.el @@ -822,6 +822,9 @@ Supports the calling convention: Where PLIST is a property list and OBJECT is a buffer or string (nil for current buffer)." (let ((plist (car args)) (object (cadr args))) + ;; Validate object if provided + (when (and object (not (or (stringp object) (bufferp object)))) + (error "OBJECT must be a string or buffer, got: %S" object)) (cons object plist))) (defun tp--deep-merge-apply (start end props obj)