あなたは二次選択を決して使いたくないと言います。その場合は、デフォルトで2次選択コマンドにバインドされているキーを、より便利なコマンドにバインドするだけです。または、それらをにバインドして、バインドを解除しますnil。これらはそれらのキーです:
M-mouse-1(mouse-start-secondaryデフォルトでは)
M-drag-mouse-1(mouse-set-secondaryデフォルトでは)
M-down-mouse-1(mouse-drag-secondaryデフォルトでは)
M-mouse-2(mouse-yank-secondaryデフォルトでは)
M-mouse-3(mouse-secondary-save-then-killデフォルトでは)
例えば:
(global-set-key [M-mouse-1] 'a-handy-mouse-command)
一方、ウィンドウマネージャーがこれらのキーを盗むことが問題である場合は、それらのコマンドに異なるキーをバインドすることを検討してください。たとえばControl、デフォルトの各キーに修飾子を追加しますC-M-mouse-1。
(global-set-key [C-M-mouse-1] 'mouse-start-secondary)
また、問題がマウスを使用して2次選択を操作したくない場合は、代わりにキーボードを使用できます。ライブラリーsecond-sel.elは、これと他の方法で2次選択を使用するのに役立ちます。
たとえば、(たとえば)にバインドするsecondary-dwimと、この方法でいつでもインタラクティブに2次選択を取り除くことができますC-M-y。
C-SPC -空のアクティブ領域を作成します。
C-1 C-M-y -二次選択をリージョン(空)に移動します。
これはcommandのドキュメント文字列でsecondary-dwim、second-sel.elデフォルトで次のようにバインドされますC-M-y。
C-M-y runs the command secondary-dwim, which is an interactive
compiled Lisp function in `second-sel.el'.
It is bound to C-M-y, menu-bar edit secondary-dwim.
(secondary-dwim ARG)
Do-What-I-Mean with the secondary selection.
Prefix arg:
None: Yank secondary.
Zero: Select secondary as region.
> 0: Move secondary to region.
< 0: Swap region and secondary.
Details:
No prefix arg: Yank the secondary selection at point. Move point to
the end of the inserted text. Leave mark where it was.
Zero arg: Select the secondary selection and pop to its buffer.
Non-zero arg: Move the secondary selection to this buffer's region.
Negative arg: Also go to where the secondary selection was and select
it as the region. That is, swap the region and the secondary
selection.
(delete-overlay secondary-mouse-overlay)か?