Skip to content

Instantly share code, notes, and snippets.

@paxperscientiam
Created May 13, 2019 16:26
Show Gist options
  • Save paxperscientiam/45f82fdec549aa21fcf3624a57cd68b0 to your computer and use it in GitHub Desktop.
Save paxperscientiam/45f82fdec549aa21fcf3624a57cd68b0 to your computer and use it in GitHub Desktop.
(defun moose/popup-count-words-region (start end &optional args)
"Get word count for positive length active region."
(interactive "r\np")
(cond ((and (use-region-p)
(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