Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with transient-mark-mode (highlighting the selection) #14

Closed
fice-t opened this issue Jul 20, 2016 · 4 comments
Closed

Compatibility with transient-mark-mode (highlighting the selection) #14

fice-t opened this issue Jul 20, 2016 · 4 comments

Comments

@fice-t
Copy link
Contributor

fice-t commented Jul 20, 2016

Would it be possible for the region to be highlighted like normal when in macrostepped code?

@fice-t fice-t changed the title Compatability with transient-mark-mode Compatibility with transient-mark-mode (highlighting the selection) Sep 11, 2016
@fice-t
Copy link
Contributor Author

fice-t commented Sep 12, 2016

@joddie I made a fix for this in #16, and it seems to work.

Though one of the tests (macrostep-expand-and-collapse) did fail for a naive fix shown here. Where is the priority property used outside of checking if it's equal to 1?

@joddie
Copy link
Owner

joddie commented Sep 25, 2016

Yes, the priority overlay property has a special meaning to Emacs: when there are several overlays at a point, all with different values for SOME-PROPERTY, priority determines which of them overrides the other. See the Elisp manual node "Overlay Properties".

I think your PR is probably good but I have a couple of questions which I will ask over there.

@joddie
Copy link
Owner

joddie commented Sep 25, 2016

Forgot to add: macrostep needs to be able to determine the innermost overlay when there are multiple levels of expansion. This is done by setting priority to higher values for each successive level of expansion, which explains why the expand-and-collapse test would fail without ti.

@fice-t
Copy link
Contributor Author

fice-t commented Sep 25, 2016

Right, I was searching around in macrostep.el for explicit uses of priority and somehow thought that since it seemed to work in trivial cases that it wasn't actually being used as normal. My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants