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

Remove button overlays when exiting markdown-mode #238

Closed
rnkn opened this issue Aug 18, 2017 · 1 comment
Closed

Remove button overlays when exiting markdown-mode #238

rnkn opened this issue Aug 18, 2017 · 1 comment
Labels

Comments

@rnkn
Copy link
Contributor

rnkn commented Aug 18, 2017

Currently GFM checklists create buttons to toggle the value of the checkbox (which are really cool). The only problem is that these are overlays that persist when changing major mode, and can only be removed with M-: (remove-overlays), which isn't user-friendly.

My suggestion is to add a hook to after-change-major-mode-hook to remove these overlays, which I think would be as simple as:

(save-restriction
  (widen)
  (remove-overlays nil nil 'face 'markdown-gfm-checkbox-face))

I can submit a PR to fix this when I get the time.

@jrblevin jrblevin added the bug label Aug 29, 2017
@jrblevin
Copy link
Owner

Thanks for noticing this. Indeed, the overlays should be removed. What you proposed seems right to me, but maybe there is some other major mode we can look at for reference?

jrblevin pushed a commit that referenced this issue Sep 18, 2017
Hook added to change-major-mode-hook when markdown-make-gfm-checkboxes is
non-nil.

Closes #238
jrblevin added a commit that referenced this issue Sep 25, 2017
Add CHANGES.md entries for the following recent issues and pull
requests:

- GH-227
- GH-238
- GH-246
- GH-254
- GH-257
- GH-258
- GH-259
- GH-260
- GH-261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants