You say that you never want to use the secondary selection. In that case, just bind the keys that are bound to secondary-selection commands by default to commands that you find more useful. Or unbind them, by binding them to
nil. These are those keys:
mouse-start-secondary, by default)
mouse-set-secondary, by default)
mouse-drag-secondary, by default)
mouse-yank-secondary, by default)
mouse-secondary-save-then-kill, by default)
(global-set-key [M-mouse-1] 'a-handy-mouse-command)
On the other hand, if the problem is that your window manager steals those keys, then consider binding different keys to those commands. For instance, add modifier
Control to each of the default keys:
(global-set-key [C-M-mouse-1] 'mouse-start-secondary)
And if the problem is that you don't want to use the mouse for manipulating the secondary selection, then you can use the keyboard instead. Library
second-sel.el can help with this and other ways to use the secondary selection.
For example, you can get rid of the secondary selection interactively anytime this way, if you bind
C-M-y (for example):
C-SPC - to create an empty active region.
C-1 C-M-y - to move the secondary selection to the region (which is empty).
This is the doc string of command
second-sel.el binds by default to
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.
Do-What-I-Mean with the secondary selection.
None: Yank secondary.
Zero: Select secondary as region.
> 0: Move secondary to region.
< 0: Swap region and secondary.
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