Sometimes, due to having a new custom built keyboard and trying to customizing 4coder at the same time, I accidentally activate the "set_mark" function. Or, possibly, some other function. The effect is, I'm left with a mark, a white rectangular box where the cursor used to be.
Is there some way to unset the mark?
I looked in the command lister but cannot find it.
Do you want to set the mark to it’s previous position? If so, no, there isn’t a command for that, though you could make one. If you never use the mark you can call the set_notepad_like_mode command or whatever it is called and you will only get a cursor, no mark. Another thing you can do is have a keybind that puts the mark at the beginning of the file. Or, though I would rather use the notepad-like thing, set the colour of the mark to the background colour. That way you won’t see it. I used to do the last one for free typing and in a ”command mode” I set the mark colour back to it’s original. Now, I switch between notepad and original/emacs mode.
4coder is designed to treat the mark as always existing wherever you left it. I believe this is a little different from emacs but emacs is weird and I never really had more than a 10% grasp of it before I switched to 4coder. I don't know what it would mean for the mark to "not exist" in 4coder, you'd have to write a whole new customization layer with a different meaning for the mark.
If the problem you're having is that you accidentally set the mark when you wanted to leave it somewhere else, you may have more luck trying to implement a "mark history" that let's you pop a stack and set the mark to it's previous position. That would also be a pretty big problem, because the setting the mark isn't hookable in any way, so you'd have to track down all the places where you set the mark, and all the places where the default code sets the mark, and modify your mark stack.
If you had that hook, or better yet, the whole mark stack, would that be better for you?
In "notepad" mode you never have a "mark" in the emacs sense, so you can't accidentally set it but you also can't intentionally leave it by a single key press. Instead you have "select a range".