Skip to content

Instantly share code, notes, and snippets.

@willert
Created May 31, 2010 21:32
Show Gist options
  • Save willert/420297 to your computer and use it in GitHub Desktop.
Save willert/420297 to your computer and use it in GitHub Desktop.
(let ((redo t))
(while redo
(goto-char (+ start 1))
(setq redo nil)
(let* ((this-block (sbw/ab-get-containing-block (point)))
(start-of-block (pop this-block))
(end-of-block (pop this-block)))
(mapcar
(lambda (this)
(let (
(cnt (overlay-get this 'sbw/ab-contents))
(stack (overlay-get this 'sbw/ab-stack))
)
(if (or (not cnt) (> (length stack) 0))
(ignore)
(save-excursion
(goto-char (overlay-start this))
(if (< (overlay-start this) start)
;; (ignore)
(message "ignoring block")
(setq redo t)
(sbw/ab-show-block-contents)
))
))
) (overlays-in start-of-block end-of-block)) ; maybe sort?
)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment