私はEmacsを初めて使用し、Shiftキーを押しながらクリックして選択できるようにする方法を考えています。CUAモードのEmacsWikiページで、次のコードスニペットがこれを行う方法の概要を示しています。
;; 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の定義を調べました:
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.
しかし、それらのどれも手がかりを与えません。moveという変数も関数も見つかりません。また、mouse.el、cua-base.el、cua-gmrk.el、cua-rect.elのソースコードも調べました。
最後の行がどのように機能するか、そして私が自分でより多くの情報を見つける方法を誰かが説明しますか?ありがとう。