Skip to content

Implement 'writegood-region' #30

Description

@rudolf-adamkovic

I would like to combine flyspell-region with writegood-mode, but writegood-mode does not provide a function to check a region of text.

This is what I came up with to work around the limitation:

(defun writegood-region (beginning end)
  "Check style between BEGINNING and END."
  (interactive "r")
  (narrow-to-region beginning end)
  (writegood-mode)
  (widen))

(defun prose-check-region (beginning end)
  "Check spelling and style between BEGINNING and END."
  (interactive "r")
  (when (use-region-p)
    (writegood-region beginning end)
    (flyspell-region beginning end)
    (setq deactivate-mark t)))

The problem is that writegood-mode remains enabled after the function writegood-region returns.

Any ideas?

Cross-posted: https://emacs.stackexchange.com/questions/64981/combine-flyspell-region-withwritegood-mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions