From 73ae2c2ea24001338dbeff5137f09bb5f784f12c Mon Sep 17 00:00:00 2001 From: tj Date: Sat, 16 Apr 2016 17:29:47 +0200 Subject: [PATCH] Add two convenience functions (feature request). --- outshine.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/outshine.el b/outshine.el index 4677791..b3ca9ea 100644 --- a/outshine.el +++ b/outshine.el @@ -2358,6 +2358,21 @@ overwritten, and the table is not marked as requiring realignment." ;;;;; Other Commands +(defun outshine-eval-lisp-subtree () + "Mark subtree at point and call `eval-region' on it." + (interactive) + (save-excursion + (outline-mark-subtree) + (call-interactively 'eval-region))) + +(defun outshine-comment-subtree-content () + "Mark subtree at point and call `comment-dwim' on its content." + (interactive) + (save-excursion + (outline-mark-subtree) + (forward-line) + (call-interactively 'comment-dwim))) + (defun outshine-narrow-to-subtree () "Narrow buffer to subtree at point." (interactive)