Last active
August 29, 2015 14:22
-
-
Save stsquad/39d84d81870a11bc1a21 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
(defvar my-overlays nil) | |
(let ((start (point-min))) | |
(save-excursion | |
(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)) | |
(forward-line) | |
(setq start (point))))) | |
(let ((o (car (last my-overlays)))) | |
(overlay-put o 'invisible t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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...