Created
May 13, 2019 16:24
-
-
Save paxperscientiam/c5eb3fe2b1ac7a9d73ab80ed3dd46409 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun moose/popup-count-words-region (start end) | |
"Get word count for positive length active region." | |
(interactive "r") | |
(cond ((and (use-region-p) | |
(> (region-end) (region-beginning)) | |
(eq this-command 'moose/popup-count-words-region)) | |
(let ((print-escape-newlines t)) | |
(popup-tip (concat (number-to-string (count-words start end)) " words")))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment