nflath/recursive-narrow — pull request #1 by sachac (2014-09-01 17:32:33+00:00)
Title: Make recursive-narrow-or-widen-dwim more configurable

- Added new custom option `recursive-narrow-dwim-functions'. You can use it like this:
(defun sacha/recursive-narrow-dwim-org ()
(cond
((not (derived-mode-p 'org-mode)) nil)
((or (org-at-block-p)
(org-in-src-block-p))
(org-narrow-to-block)
t)
(t (org-narrow-to-subtree) t)))
(add-hook 'recursive-narrow-dwim-functions 'sacha/recursive-narrow-dwim-org)

- Rewrote the narrow-to-defun function to take advantage of built-in code. Moved the saving of information to a macro for easier wrapping around the dwim-functions.

- Removed need for cl. (I think this should still work...)