Again, thank you for your patience and your reviews. PS: the prompt now looks like this ('?' characters are highlighted with the warning face): With markers: > Confirm: > sed 's/\?/!/' > ^ > Send 1 occurrence of ‘?’ as-is to shell? Without markers: > Confirm: > sed 's/\?/!/' > Send 1 occurrence of ‘?’ as-is to shell? I added the "Confirm:" line because - y-or-n-p adds "Please answer y or n. " before the prompt when the user fails to answer correctly, so the markers would not line up if the command remained on the first line, - y-or-n-p adds " (y or n)" after the prompt; I find it more legible to have the question next to this suffix, so I did not want to move the question to the first line.