This function highlights a region of text in the buffer.
The range between start and end will be highlighted with the color in color, and bitmap will be painted over the range of text in black and white. If bitmap is #f, the range will be inverted, using the platform specific xor. This method is not reccommend, because the selection is also displayed using xor.
If caret-space? is not #f, the left edge of the range will be one pixel short, to leave space for the caret. The caret does not interfere with the right hand side of the range. Note that under X windows the caret is drawn with XOR, which means almost anything can happen. So if the caret is in the middle of the range it may be hard to see, or if it is on the left of the range and caret-space? is #f it may also be hard to see.
The function will return a thunk, which when invoked will turn off the highlighting from this range.