Move outline-toggle-entry to outline library
This commit is contained in:
parent
1eb19ac1ad
commit
d3b3c33753
2 changed files with 12 additions and 10 deletions
|
@ -141,16 +141,6 @@ MODE1 is enabled and vice-versa."
|
||||||
"Set the `disabled' property for each item in FUNCTIONS to nil."
|
"Set the `disabled' property for each item in FUNCTIONS to nil."
|
||||||
(mapc #'(lambda (f) (put f 'disabled nil)) functions))
|
(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)
|
(defun multiplication-table (number &optional upto)
|
||||||
"Print a multiplication table of NUMBER up to UPTO."
|
"Print a multiplication table of NUMBER up to UPTO."
|
||||||
(interactive "nMultiplication table for: \nP")
|
(interactive "nMultiplication table for: \nP")
|
||||||
|
|
|
@ -40,5 +40,17 @@
|
||||||
(outline-hide-entry))
|
(outline-hide-entry))
|
||||||
(call-interactively func))))))
|
(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)
|
(provide 'oni-outline)
|
||||||
;;; oni-outline.el ends here
|
;;; oni-outline.el ends here
|
||||||
|
|
Loading…
Reference in a new issue