Bram Schoenmakers
002393ad7a
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.
17 KiB
17 KiB