Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
(defvar my-overlays nil)
(let ((start (point-min)))
(goto-char start)
(while (re-search-forward "aaaa" nil t)
(let ((overlay (make-overlay start (- (match-beginning 0) 1))))
(add-to-list 'my-overlays overlay))
(setq start (point)))))
(let ((o (car (last my-overlays))))
(overlay-put o 'invisible t))

This comment has been minimized.

Copy link
Owner Author

@stsquad stsquad commented May 28, 2015

Obviously this code is partial and doesn't hide all the overlays it's created. It also needs code to restore the overlays after being done. Oh and the variable should be buffer local - yadda yadda...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment