From ecf6acae88d0218a6b73c196c93314348a1048f5 Mon Sep 17 00:00:00 2001 From: Greg Sexton Date: Sat, 31 May 2014 18:29:27 +0100 Subject: [PATCH] Add minor mode hook variable --- origami.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/origami.el b/origami.el index 8a44bc8..02496c7 100644 --- a/origami.el +++ b/origami.el @@ -101,7 +101,7 @@ (defun origami-fold-root-node (&optional children) ;; TODO: fix min and max - (origami-fold-node-raw 1 10000 t children 'root)) + (origami-fold-node-raw 1 100000 t children 'root)) (defun origami-fold-is-root-node? (node) (eq (origami-fold-data node) 'root)) @@ -461,7 +461,7 @@ otherwise fetch cached tree." ;;; commands -;;; TODO: should ensure that minor mode is enabled? +;;; TODO: should ensure that minor mode is enabled ;;; TODO: extract common pattern ;;; TODO: document @@ -559,6 +559,11 @@ as to ensure seeing where POINT is." map) "Keymap for `origami-mode'.") +(defcustom origami-mode-hook nil + "Hook called when origami minor mode is activated or deactivated." + :type 'hook + :group 'origami) + (define-minor-mode origami-mode "Minor mode to selectively hide/show text in the current buffer. With a prefix argument ARG, enable the mode if ARG is positive,