[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extending mouse selection?
From: |
Nikolaj Schumacher |
Subject: |
Re: extending mouse selection? |
Date: |
Sat, 04 Oct 2008 17:00:12 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) |
Neal Becker <ndbecker2@gmail.com> wrote:
> Should this work?
Emacs doesn't necessarily follow such conventions.
One could argue, however, that it should work at least in cua-mode. You
could report it as a bug and see what happens.
> Is there an alternative key binding?
I don't know, but writing your own command is pretty straight-forward:
(defun mouse-extend-region (event)
(interactive "e")
(let ((pos (posn-point (event-start event))))
(set-mark (if mark-active
(if (< pos (region-beginning))
(region-end)
(region-beginning))
(point)))
(goto-char pos)))
(global-set-key (kbd "<S-mouse-1>") 'mouse-extend-region)
(global-set-key (kbd "<S-down-mouse-1>") nil)
regards,
Nikolaj Schumacher