unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Federico Tedin <federicotedin@gmail.com>
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	[thread overview]
Message-ID: <jwvy375rvyy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 87a7jnt72q.fsf@gmail.com

> 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 <thearg>).

> - 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




  reply	other threads:[~2019-01-28  9:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181017063829.3775.67018@vcs0.savannah.gnu.org>
     [not found] ` <20181017063831.03DCB2044D@vcs0.savannah.gnu.org>
2018-10-17 15:47   ` [Emacs-diffs] master 134ba45: Allow two mouse functions to work with Rectangle Mark mode Stefan Monnier
2018-10-17 16:17     ` Drew Adams
2018-10-19 15:24       ` Stefan Monnier
2018-10-20  3:21         ` Federico Tedin
2018-10-20  3:48           ` Stefan Monnier
2018-10-20 20:21             ` Federico Tedin
2018-10-20 20:56               ` Federico Tedin
2018-10-20 21:21               ` Stefan Monnier
2018-10-21  8:22                 ` martin rudalics
2018-10-22 13:04                   ` Federico Tedin
2018-10-25 23:24                     ` Federico Tedin
2018-10-26 17:25                       ` Stefan Monnier
2018-10-26 22:07                         ` Federico Tedin
2018-10-28  0:30                           ` Stefan Monnier
2018-10-29 23:40                             ` Federico Tedin
2018-10-30 12:52                               ` Stefan Monnier
2019-01-07 17:40                               ` Stefan Monnier
2019-01-26 21:58                                 ` Federico Tedin
2019-01-28  9:12                                   ` Stefan Monnier [this message]
2019-01-29  4:02                                     ` Federico Tedin
2019-01-29  9:28                                       ` Stefan Monnier
2019-01-30  3:39                                         ` Federico Tedin

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=jwvy375rvyy.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=federicotedin@gmail.com \
    /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).