I'm using GUI emacs 184.108.40.206, so I can click to move the cursor, and double-click to select a word under the mouse pointer as a region.
How can I configure emacs so that right-click selects a character under the mouse pointer? I know that I can assign a function by writing
(global-set-key (kbd "<mouse-3>") 'foobar)
in the init file, but when I wrote a function for this purpose a while ago, it didn't put the cursor under the place I right-clicked, it just started marking a character forward from where the mouse pointer is currently at. What kind of function I can use for placing the cursor right under the mouse pointer?