unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
To: emacs-devel@gnu.org
Subject: binding S-mouse-1
Date: Sun, 28 May 2017 19:06:48 +0900 (JST)	[thread overview]
Message-ID: <20170528.190648.38300257.tkk@misasa.okayama-u.ac.jp> (raw)

Keys <S-right> and <S-left> extend region.  I think that [S-mouse-1]
should behave similar by default.

I propose to bind mouse-appearance-menu to super instead of shift,
  (global-set-key [S-down-mouse-1] 'mouse-appearance-menu)
and bind following to let shift click to extend region on mouse.el.
  (global-set-key [S-down-mouse-1] 'ignore)
  (global-set-key [S-mouse-1] 'mouse-save-then-kill)


diff --git a/mouse.26.el b/mouse.el
index 9b6b169..fdca439 100755
--- a/mouse.26.el
+++ b/mouse.el
@@ -2046,7 +2046,7 @@ is copied instead of being cut."
 ;; event to make the selection, saving a click.
 (global-set-key [C-down-mouse-1] 'mouse-buffer-menu)
 (if (not (eq system-type 'ms-dos))
-    (global-set-key [S-down-mouse-1] 'mouse-appearance-menu))
+    (global-set-key [s-down-mouse-1] 'mouse-appearance-menu))
 ;; C-down-mouse-2 is bound in facemenu.el.
 (global-set-key [C-down-mouse-3]
   `(menu-item ,(purecopy "Menu Bar") ignore
@@ -2055,6 +2055,10 @@ is copied instead of being cut."
                   (mouse-menu-bar-map)
                 (mouse-menu-major-mode-map)))))
 
+;; Binding mouse-1 to extend region when `shift' is pressed.
+(global-set-key [S-down-mouse-1] 'ignore)
+(global-set-key [S-mouse-1] 'mouse-save-then-kill)
+
 ;; Binding mouse-1 to mouse-select-window when on mode-, header-, or
 ;; vertical-line prevents Emacs from signaling an error when the mouse
 ;; button is released after dragging these lines, on non-toolkit



             reply	other threads:[~2017-05-28 10:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 10:06 Tak Kunihiro [this message]
2017-05-28 15:18 ` binding S-mouse-1 Eli Zaretskii
2017-05-28 15:41   ` Noam Postavsky
2017-05-28 23:14     ` Tak Kunihiro
2017-05-29  2:42       ` Eli Zaretskii
2017-05-30  8:20         ` Tak Kunihiro
2017-05-30  8:41           ` Eli Zaretskii
2017-05-29  7:59       ` Yuri Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170528.190648.38300257.tkk@misasa.okayama-u.ac.jp \
    --to=tkk@misasa.okayama-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).