There was an old problem that ‘isearch-edit-string’ incorrectly restored a previous isearch mode in such commands as ‘comint-history-isearch-backward’ and ‘dired-isearch-filenames’ because they let-bind variables that affects the search parameters, e.g. ‘(let ((dired-isearch-filenames t)))’ only at the starting isearch, but when ‘M-e’ (isearch-edit-string) exits isearch, and later starts again, these let-binding are not in effect and thus restore the wrong search state. All imaginable solutions were very bad. But now I found a solution that at least not bad. It changes the global value of customizable variables for the time while isearch is active (including the time when isearch is suspended temporarily), and restores the original value afterwards.