Paste number 44307: Allout toggling oy subtrees

Paste number 44307: Allout toggling oy subtrees
Pasted by: Tassilo
1 year, 5 months ago
None
Paste contents:
Raw Source | XML | Display As
(add-hook 'allout-mode-hook
          (lambda()
            (th-font-lock-allout)
            (local-set-key (kbd "C-c C-a C-t") 'th-allout-toggle-current-subtree)
)
)


(defun th-allout-toggle-current-subtree ()
  "Show or hide the current subtree depending on its current
state."

  (interactive)
  (save-excursion
    (allout-back-to-heading)
    (if (allout-hidden-p (point-at-eol))
        (progn
          (allout-show-current-subtree)
)

      (allout-hide-current-subtree)
)
)
)

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.