If overwrite-mode is active the typed character should be inserted instead of the original.
When I delete a character (for example to correct it) then it should restore the original character.
Keep in mind to transfer the text-properties from the original to the typed character and vice versa.
There are two possible strategies to "restore":
- store the original character in the text-property of the typed character.
- calculate the exact position via orig-pos and get the original character from the content-buffer. (This solution is much harder, for example it would result in inconsistencies when certain transform-hook are used, the orig-pos is stored per "word" not per character).
Clarifications:
"word" isn't (thing-at-point 'word). It's rather consecutive characters until whitespace is hit.
If overwrite-mode is active the typed character should be inserted instead of the original.
When I delete a character (for example to correct it) then it should restore the original character.
Keep in mind to transfer the text-properties from the original to the typed character and vice versa.
There are two possible strategies to "restore":
Clarifications:
"word" isn't
(thing-at-point 'word). It's rather consecutive characters until whitespace is hit.