Skip to content

Instantly share code, notes, and snippets.

@buzztaiki
Last active December 14, 2015 05:38
Show Gist options
  • Select an option

  • Save buzztaiki/5036281 to your computer and use it in GitHub Desktop.

Select an option

Save buzztaiki/5036281 to your computer and use it in GitHub Desktop.
highlight region.
(defun hilit (beg end)
(interactive "r")
(let ((ov (make-overlay beg end)))
(overlay-put ov 'hilit-overlay t)
(overlay-put ov 'face 'hi-blue))
(deactivate-mark))
(defun hilit-clear ()
(interactive)
(loop for ov in (overlays-in (point-min) (point-max))
if (overlay-get ov 'hilit-overlay)
do (delete-overlay ov)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment