From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.devel Subject: binding S-mouse-1 Date: Sun, 28 May 2017 19:06:48 +0900 (JST) Message-ID: <20170528.190648.38300257.tkk@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1495966032 4534 195.159.176.226 (28 May 2017 10:07:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 May 2017 10:07:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 28 12:07:04 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEv6G-000103-6V for ged-emacs-devel@m.gmane.org; Sun, 28 May 2017 12:07:04 +0200 Original-Received: from localhost ([::1]:43319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEv6L-0001Eh-N1 for ged-emacs-devel@m.gmane.org; Sun, 28 May 2017 06:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEv6F-0001Ec-IY for emacs-devel@gnu.org; Sun, 28 May 2017 06:07:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEv6C-0007Jq-DM for emacs-devel@gnu.org; Sun, 28 May 2017 06:07:03 -0400 Original-Received: from mxl069v66.mxlogic.net ([208.81.69.66]:11356 helo=s18p02o143.mxlogic.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dEv6B-0007Is-PH for emacs-devel@gnu.org; Sun, 28 May 2017 06:07:00 -0400 Original-Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s18p02o143.mxlogic.net(mxl_mta-8.5.0-1789) over TLS secured channel with ESMTP id b31aa295.0.9003.00-389.17435.s18p02o143.mxlogic.net (envelope-from ); Sun, 28 May 2017 04:06:51 -0600 (MDT) X-MXL-Hash: 592aa13b2f5ec7e0-bd3a0b135f49fe767a6aab956f2df32e2b3c6eef Original-Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 57fa_1031_041591ef_9d7a_4063_bd65_384935e33a7a; Sun, 28 May 2017 19:06:49 +0900 Original-Received: from localhost (p256188-ipngn200208tottori.tottori.ocn.ne.jp [180.36.253.188]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 72EA04C0A14 for ; Sun, 28 May 2017 19:06:50 +0900 (JST) X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0.6 X-NAI-Spam-Rules: 5 Rules triggered TS_MSG_REP_20=0.6, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6036=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6036> : inlines <5886> : streams <1747449> : uri <2434143> X-AnalysisOut: [v=2.2 cv=BMDDlBYG c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=kj9zAlcOel0A:10 a=tJ8] X-AnalysisOut: [p9aeEuA8A:10 a=hdTmZlVVKI9TmSQmeHMA:9 a=7Zwj6sZBwVKJAoWSPK] X-AnalysisOut: [xL6X1jA+E=:19 a=CjuIK1q_8ugA:10] X-Spam: [F=0.5000000000; CM=0.500; MH=0.500(2017052803); S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 208.81.69.66 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215276 Archived-At: Keys and 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