>> There is already the minor mode: delete-selection-mode >> that is configured by symbol properties. >> Supporting a descriptive symbol name would allow to easily >> configure the desired behavior with just: >> >> (put 'mouse-yank-at-click 'delete-selection 'yank-on-region) > > The problem is that you have to `put' on three symbols, which isn't > optimal. (My proposed mode does just that.) The default settings should be suitable for all users, but modes for groups of settings could be added too. This patch works well but only like Visuwesh pointed out when mouse-yank-at-point is set to t. This is because mouse-yank-primary has such line: (or mouse-yank-at-point (mouse-set-point event)) When delete-selection deletes the region where the mouse is clicked, mouse-set-point loses track and sets point to a random position, because the event contains fixed positions, not markers. I wonder why?