From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 134ba45: Allow two mouse functions to work with Rectangle Mark mode Date: Mon, 28 Jan 2019 04:12:39 -0500 Message-ID: References: <20181017063829.3775.67018@vcs0.savannah.gnu.org> <20181017063831.03DCB2044D@vcs0.savannah.gnu.org> <810f1e04-1117-476d-9a7d-d57002609bf8@default> <5BCC3743.8040103@gmx.at> <87a7jnt72q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="269573"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Federico Tedin To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 28 10:12:58 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go2yP-0017wA-Qk for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 10:12:57 +0100 Original-Received: from localhost ([127.0.0.1]:56429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go2yO-0007Gj-K9 for ged-emacs-devel@m.gmane.org; Mon, 28 Jan 2019 04:12:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go2yI-0007GR-SJ for emacs-devel@gnu.org; Mon, 28 Jan 2019 04:12:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go2yI-0003vF-36 for emacs-devel@gnu.org; Mon, 28 Jan 2019 04:12:50 -0500 Original-Received: from [195.159.176.226] (port=55680 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1go2yH-0003uc-RP for emacs-devel@gnu.org; Mon, 28 Jan 2019 04:12:50 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1go2yF-0017k2-3a for emacs-devel@gnu.org; Mon, 28 Jan 2019 10:12:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:iybuAWvsDMwFEXLoBSFNY81sHlo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:232754 Archived-At: > Yes, that is true. Starting from the example code you sent earlier, > would this make more sense? I added (activate-mark) as I > imagine that a call to `reactivate-mark' would always be preceded by a > call to `activate-mark' anyways: > > (cl-defmethod reactivate-mark ((marktype (eql t))) > (activate-mark)) > > (cl-defmethod reactivate-mark ((marktype (eql rectangle))) > ;; Rectangular mark > (activate-mark) > (rectangle-mark-mode)) That seems to go in the right direction, yes. > Then, in mouse.el the following could be added: > > (cl-defmethod drag-negligible-p ((marktype (eql t))) > ...) > > (cl-defmethod drag-negligible-p ((marktype (eql rectangle))) > ...) Exactly (tho the name should clarify that we're talking about something related to the mark). > Other questions I have are: > - Where would `marktype' be defined? I think it should be the object stored in `mark-active`. We might be able to merge reactivate-mark and activate-mark into a single mark-activate (and use the "mark-" prefix in all other methods) which by default just does (setq mark-active ). > - When activating an alternate region mode (e.g. rectangle-region-mode), > would the previous mark type be stored and then set back, or would it > simply go back to the default? (t) I don't understand the question: when would we st it back (to t or to some saved value)? Stefan