From d3b3c337537e539b89d6600bacc38d9e642c2523 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 19 Dec 2015 00:24:39 +0100 Subject: [PATCH] Move outline-toggle-entry to outline library --- emacs/.emacs.d/init.el | 10 ---------- emacs/.emacs.d/site-lisp/oni-outline.el | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 7668a38..0b84289 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -141,16 +141,6 @@ MODE1 is enabled and vice-versa." "Set the `disabled' property for each item in FUNCTIONS to nil." (mapc #'(lambda (f) (put f 'disabled nil)) functions)) -(defun oni:outline-toggle-entry () - (interactive) - (if (outline-on-heading-p) - (if (eql (save-excursion - (end-of-line) - (outline-invisible-p)) - 'outline) - (outline-show-entry) - (outline-hide-entry)))) - (defun multiplication-table (number &optional upto) "Print a multiplication table of NUMBER up to UPTO." (interactive "nMultiplication table for: \nP") diff --git a/emacs/.emacs.d/site-lisp/oni-outline.el b/emacs/.emacs.d/site-lisp/oni-outline.el index 6c56515..96d7179 100644 --- a/emacs/.emacs.d/site-lisp/oni-outline.el +++ b/emacs/.emacs.d/site-lisp/oni-outline.el @@ -40,5 +40,17 @@ (outline-hide-entry)) (call-interactively func)))))) +;;;###autoload +(defun oni:outline-toggle-entry () + "Show or hide an outline entry depending on its current state." + (interactive) + (if (outline-on-heading-p) + (if (eql (save-excursion + (end-of-line) + (outline-invisible-p)) + 'outline) + (outline-show-entry) + (outline-hide-entry)))) + (provide 'oni-outline) ;;; oni-outline.el ends here