I am new to Emacs and figuring out how to enable click-change selection. On the EmacsWiki page for CUA Mode , the following code snippet describes 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 do not understand how the last line allows you to choose. I reviewed the definition of put :
put is a built-in function in `C source code'. (put SYMBOL PROPNAME VALUE) Store SYMBOL PROPNAME property with value VALUE. It can be retrieved with `(get SYMBOL PROPNAME)'.
and mouse pointer definition:
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 not one of them gives any clues. I cannot find any variable or function called move , and I also studied the source code of mouse.el, cua-base.el, cua-gmrk.el and cua-rect. email
Can someone explain how the last line works, and how can I find more information myself? Thanks.
source share