I just realized that Emacs has mouse gesture recognition and it is called strokes-mode. I enabled it simply by
M-x strokes-mode and then by invoking
M-x strokes-global-set-stroke I created a very simple mouse gesture (by pressing left mouse button and dragging leftwards it along a more or less straight line) and then after pressing the right mouse button (that is the rightmost mouse button with scroll moused, mouse 3 in Emacs terminology) assigned the kill-buffer function to the mouse gesture. After that I pressed Shift and then dragged the mouse while pressing the middle button and saw that it correctly interpreted the gesture by invoking kill-buffer function.
Immediate help about gesture recognition is available via
M-x strokes-help. You can learn more about the internals of gesture recognition in Emacs simply by reading the source code at http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/strokes.el
Not that I’d prefer using mouse gestures for simple commands but nevertheless I was surprised to discover yet another feature of Emacs which helps its fame of being called “… has everything but the kitchen sink” 😉