Add minor mode hook variable

This commit is contained in:
Greg Sexton 2014-05-31 18:29:27 +01:00
parent 7ca8127f75
commit ecf6acae88

View File

@ -101,7 +101,7 @@
(defun origami-fold-root-node (&optional children) (defun origami-fold-root-node (&optional children)
;; TODO: fix min and max ;; 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)) (defun origami-fold-is-root-node? (node) (eq (origami-fold-data node) 'root))
@ -461,7 +461,7 @@ otherwise fetch cached tree."
;;; commands ;;; commands
;;; TODO: should ensure that minor mode is enabled? ;;; TODO: should ensure that minor mode is enabled
;;; TODO: extract common pattern ;;; TODO: extract common pattern
;;; TODO: document ;;; TODO: document
@ -559,6 +559,11 @@ as to ensure seeing where POINT is."
map) map)
"Keymap for `origami-mode'.") "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 (define-minor-mode origami-mode
"Minor mode to selectively hide/show text in the current buffer. "Minor mode to selectively hide/show text in the current buffer.
With a prefix argument ARG, enable the mode if ARG is positive, With a prefix argument ARG, enable the mode if ARG is positive,