smart-mark-mode is a global minor mode. When it is active and you press C-g after a mark function, the cursor restores to its initial location.