From b0987d0c25ef07082a3bb904299487347565e87f Mon Sep 17 00:00:00 2001 From: Daniel Pettersson Date: Sun, 1 Dec 2024 23:10:39 +0100 Subject: [PATCH] Fix leaking dash replacement props on unbalanced options list --- dape.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dape.el b/dape.el index 0b10fc26..2c18be54 100644 --- a/dape.el +++ b/dape.el @@ -5045,6 +5045,8 @@ Where ALIST-KEY exists in `dape-configs'." (let ((thing (read (current-buffer)))) (cond ((eq thing '-) + (unless (dape--plistp read-config) + (user-error "Expecting complete options list before `-'")) (cl-loop with command = (split-string-shell-command (buffer-substring (point) (point-max))) @@ -5065,7 +5067,7 @@ Where ALIST-KEY exists in `dape-configs'." and return (goto-char (point-max)))) (t (push thing read-config)))))) - ;; Try to save half baked plist (value missing) + ;; Balance half baked options list (when (not (dape--plistp read-config)) (pop read-config)) (unless (dape--plistp read-config)