From e409be20b45acde0be0310a02d5572a5228a56b9 Mon Sep 17 00:00:00 2001 From: Bram Schoenmakers Date: Sat, 3 Feb 2024 07:00:46 +0100 Subject: [PATCH] Do not insert a list element if no insert prompt is needed --- kagi.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kagi.el b/kagi.el index e62b298..0cdf6bb 100644 --- a/kagi.el +++ b/kagi.el @@ -529,11 +529,11 @@ defined in `kagi--summarizer-engines'." Not all commands need to insert a summary, so only prompt for this when PROMPT-INSERT-P is non-nil." (append - (list - (and prompt-insert-p - (equal current-prefix-arg '(4)) - (not buffer-read-only) - (y-or-n-p "Insert summary at point?"))) + (when prompt-insert-p + (list + (and (equal current-prefix-arg '(4)) + (not buffer-read-only) + (y-or-n-p "Insert summary at point?")))) (list (when (equal current-prefix-arg '(4)) (let ((language-table (mapcar (lambda (lang)