Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun count-blank-lines (&optional arg)
- (interactive "p")
- (let ((count 0)
- (reg "^$")
- (end (point-max)))
- (while (and (null (= (point) end))
- (re-search-forward reg end t))
- (cl-incf count)
- (forward-line))
- (if arg
- (message "%d blank lines found" count)
- count)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement