1
0
Fork 0
kagi.el/kagi.info
Bram Schoenmakers 002393ad7a
Fix %s expansion in prompts defined with define-kagi-fastgpt-prompt
The expansion is done with replace-regexp-in-string, which does a
combination of string-match and replace-match. When a function is
passed to replace-regexp-in-string instead of a text, it will call
kagi--get-text-for-prompt which uses the minibuffer / completing read,
possibly messing up the (match-data) along the way that
replace-regexp-in-string relies on. Therefore, save the matching data
before calling the supplied text function, so it will be restored and
replace-regexp-in-string won't notice it.
2024-07-23 21:20:41 +02:00

17 KiB