我是Emacs的新手,並搞清楚如何啓用輪班點擊選擇。論CUA Mode的EmacsWiki頁面,下面的代碼段概述瞭如何做到這一點:瞭解用於輪班點擊選擇的Emacs CUA模式
;; 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)
我不明白,最後一行是如何讓選擇。我已經研究過的定義把:
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)'.
和鼠標設定點的定義:
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.
但他們沒有提供任何線索。我找不到任何變量或函數,稱爲移動,並且我還查看了mouse.el,cua-base.el,cua-gmrk.el和cua-rect.el的源代碼。
有人會解釋最後一行是如何工作的,以及我如何能夠自己找到更多信息?謝謝。
答案有幫助嗎? – Specksynder