ed: Diagnostics

1 
1 8 Diagnostics
1 *************
1 
1 When an error occurs, if 'ed''s input is from a regular file or here
1 document, then it exits, otherwise it prints a '?' and returns to
1 command mode. An explanation of the last error can be printed with the
1 'h' (help) command.
1 
1    If the 'u' (undo) command occurs in a global command list, then the
1 command list is executed only once.
1 
1    Attempting to quit 'ed' or edit another file before writing a
1 modified buffer results in an error. If the command is entered a second
1 time, it succeeds, but any changes to the buffer are lost.
1