Implement reset

This commit is contained in:
Greg Sexton 2014-04-21 20:05:50 +01:00
parent 0f08711a7f
commit 566dc99370

View File

@ -210,8 +210,8 @@ contains point, or null."
(origami-create-overlay-for-node new buffer)))) (origami-create-overlay-for-node new buffer))))
(defun origami-remove-all-overlays (buffer) (defun origami-remove-all-overlays (buffer)
;; TODO: (with-current-buffer buffer
) (remove-overlays (point-min) (point-max) 'invisible 'origami)))
;;; content structure ;;; content structure
@ -431,10 +431,13 @@ otherwise fetch cached tree."
;; TODO: provide this to the user in case we get screwed up, maybe ;; TODO: provide this to the user in case we get screwed up, maybe
;; use this when disabling the minor mode? Could possibly diff ;; use this when disabling the minor mode? Could possibly diff
;; against null? ;; against null?
(interactive) (interactive (list (current-buffer)))
(origami-remove-all-overlays buffer) (let ((tree (origami-get-fold-tree buffer)))
;; TODO: remove fold ds (origami-fold-diff tree (origami-store-cached-tree buffer (origami-fold-top-level-node))
) (origami-create-overlay-from-fold-tree-fn buffer)
(origami-delete-overlay-from-fold-tree-fn buffer)
(origami-change-overlay-from-fold-node-fn buffer)))
(origami-remove-all-overlays buffer))
;;; minor mode ;;; minor mode