Don't know if anyone has already done this, but I see it's not in
Stig's latest ftp-able thing. For me, it often works in 1/3 to 1/6
the time of the hilit19 function, by eliminating the call to
within a while loop.
;; A faster unhighlighting function for hilit19
(defun hilit-unhighlight-region (start end &optional quietly)
"Unhighlights the region from START to END, optionally in a QUIET way"
(or quietly hilit-quietly (message "Unhighlighting"))
(let ((list (overlay-lists)))
(mapcar (function (lambda (ovr)
(and (overlay-get ovr 'hilit)
(>= (overlay-start ovr) start)
(<= (overlay-end ovr) end)
(append (car list) (cdr list))))
(or quietly hilit-quietly (message "Done unhighlighting")))