Doug Merkley contributed an AutoLISP routines that “mends” lines. It joins two lines into one, using the start point of the first line selected and the end point of the second line selected to create the new line. Download it.
Mark McDonough contributed a different type of AutoLISP file, which he calls heal.lsp. It only creates the new line if the two selected lines are colinear, that is, at the same angle. Download it.