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

Add defun markdown-is-fontify-buffer-p #876

Closed

Conversation

shipmints
Copy link
Contributor

This is extremely useful in a prog-mode' hook to avoid resource-intensive features such as eglot' inside a fontification buffer.

Type of Change

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

This is extremely useful in a `prog-mode' hook to avoid
resource-intensive features such as `eglot' inside a fontification
buffer.
@shipmints
Copy link
Contributor Author

I'm rescinding this PR in favor of recommending the following which can be used in prog-modes to test for avoiding expensive resources when in non-file buffers or conventionally hidden buffers:

    (when (or buffer-file-name
              (not (string-prefix-p " " (buffer-name))))
      ;; do something expensive
      )

Perhaps we can add this to the documentation. I'll make a PR for that.

@shipmints shipmints closed this Jan 18, 2025
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

Successfully merging this pull request may close these issues.

1 participant