markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

Make markdown-mouse-follow-link work when nil

Open adaerr opened this issue 4 years ago • 0 comments

Hi, This PR makes markdown-mode behave as intended when markdown-mouse-follow-link (introduced in commit 0fdbf89fc825dc2675d0d78469d235a39c32a183 as an answer to issue GH-290) is false: no link highlighting through mouse-face, and no link following. No guarantee as to the cleanliness or elegance of the hack, but an improvement over the preceding state. Also corrects a minor bug which prevented the variable from being customisable interactively.

In summary this commit

  1. corrects the variable type so it can be toggled in customize-mode
  2. defines markdown-mode-mouse-map to an empty map instead of just breaking it
  3. deactivates the mouse-face property attribution when no link following wanted. This provides the (presumably) intended behaviour when set to nil.

Thanks for markdown-mode! cheers, Adrian

Description

Related Issue

Type of Change

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] Improvement (non-breaking change which improves an existing feature)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [ ] I have read the CONTRIBUTING.md document.
  • [ ] I have updated the documentation in the README.md file if necessary.
  • [ ] I have added an entry to CHANGES.md.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed (using make test).

adaerr avatar Apr 18 '21 17:04 adaerr