Lars Ingebrigtsen writes: > OK, the first sweep has now landed on master (I basically grepped for > " (default %" and then did the changes. Boy, were there many different > ways to "optionally add some defaults" in the code... > > 78 files changed, 316 insertions(+), 453 deletions(-) > > Look at all the lines saved! :-) > > There's also some of the prompting functions that have some support for > this general idea, but in different ways: > > (defun read-regexp (prompt &optional defaults history) > [...] > (input (read-from-minibuffer > (cond ((string-match-p ":[ \t]*\\'" prompt) > prompt) > ((and default (> (length default) 0)) > (format "%s (default %s): " prompt > (query-replace-descr default))) > (t > (format "%s: " prompt))) > nil nil nil (or history 'regexp-history) suggestions t))) Any reason this function wasn't changed in the end?