DWIM (do what I mean) computer systems attempt to anticipate what users intend to do, correcting trivial errors automatically rather than blindly executing users' explicit but potentially incorrect inputs.
Although most users think of DWIM as a single identifiable package, it embodies a pervasive philosophy of user interface design: at the user interface level, system facilities should make reasonable interpretations when given unrecognized input. ...the style of interface used throughout Interlisp allows the user to omit various parameters and have these default to reasonable values...
DWIM is an embodiment of the idea that the user is interacting with an agent who attempts to interpret the user's request from contextual information. Since we want the user to feel that he is conversing with the system, he should not be stopped and forced to correct himself or give additional information in situations where the correction or information is obvious.
Critics of DWIM claimed that it was "tuned to the particular typing mistakes to which Teitelman was prone, and no others" and called it "Do What Teitelman Means," "Do What Interlisp Means" or even claimed DWIM stood for "Damn Warren's Infernal Machine." 
The DWIM concept has been adopted by users of the GNU Emacs text editor to describe Emacs Lisp functions or commands that "do the right thing" depending on context, and do not specifically correct the user's typing. The Emacs wiki gives the example of a file copy command that is able to deduce the destination path from a split window configuration that contains two dired windows, one of which displays the source path. DWIM functionality is often mentioned in the command's name; GNU Emacs has a
comment-dwim function that comments out a selected region if uncommented, or uncomments it when already commented out, using comment characters and indentation appropriate for the environment and current context.
- Warren Teitelman, "PILOT: A Step towards Man-Computer Symbiosis", M.I.T. Ph.D. Dissertation, Project MAC MAC-TR-32, September 1966. DTIC AD0638446 Archived 2012-04-18 at the Wayback Machine PDF[permanent dead link], p. 51
- Warren Teitelman, "Toward a programming laboratory", in J. N. Buxton and Brian Randell, Software Engineering Techniques, April 1970, a report on a conference sponsored by the NATO Science Committee, Rome, Italy, 27–31 October 1969, p. 108ff.
- Donald E. Walker, Lewis M. Norton (Eds.): Proceedings of the 1st International Joint Conference on Artificial Intelligence, Washington, DC, p 715, May 1969.
- Warren Teitelman, Larry Masinter, "The Interlisp Programming Environment", Computer (IEEE) 14:4:25-33, April 1981. doi:10.1109/C-M.1981.220410 pdf
- Guy L. Steele Jr., Richard P. Gabriel, "The Evolution of Lisp", in History of programming languages---II, 1996, ISBN 0-201-89502-1 doi:10.1145/234286.1057818, p. 16. pdf
- "Do What I Mean".
- "Comment Tips".
Generally speaking, the M-; (comment-dwim) command automatically starts a comment of the appropriate type; or indents an existing comment to the right place, depending on the number of semicolons.
- "Comment Commands".
The command to create or align a comment is M-; (comment-dwim). The word “dwim” is an acronym for “Do What I Mean”; it indicates that this command can be used for many different jobs relating to comments, depending on the situation where you use it.