Add input validation for OBJECT parameter in tp--parse-match-args
Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com>
This commit is contained in:
parent
c3ba26872a
commit
95c3d79f4b
3
tp.el
3
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user