I'm new to Emacs and figuring out how to enable shift-click selection. On the EmacsWiki page for CUA Mode, the following code snippet outlines how to do this:
;; shift + click select region
(define-key global-map (kbd "<S-down-mouse-1>") 'ignore) ; turn off font dialog
(define-key global-map (kbd "<S-mouse-1>") 'mouse-set-point)
(put 'mouse-set-point 'CUA 'move)
I don't understand how the last line enables selection. I've looked into the definition of put:
put is a built-in function in `C source code'.
(put SYMBOL PROPNAME VALUE)
Store SYMBOL's PROPNAME property with value VALUE.
It can be retrieved with `(get SYMBOL PROPNAME)'.
and the definition of mouse-set-point:
mouse-set-point is an interactive compiled Lisp function in
`mouse.el'.
It is bound to <S-mouse-1>, <triple-mouse-1>, <double-mouse-1>,
<mouse-1>.
(mouse-set-point EVENT)
Move point to the position clicked on with the mouse.
This should be bound to a mouse click event type.
but none of them give any clues. I can't find any variable nor function called move, and I've also looked into the source code of mouse.el, cua-base.el, cua-gmrk.el and cua-rect.el.
Would someone explain how the last line works, and how I can find more information by myself? Thanks.