[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 134ba45: Allow two mouse functions to work with

From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]