mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-26 04:32:52 +00:00
org-fold-subtree: Hide blank lines at the end as well
* lisp/org-fold.el (org-fold-subtree): Hide blank lines before the next subtree as well. Add docstring. Reported-by: Alexandros Prekates <aprekates@posteo.net> Link: https://orgmode.org/list/20221114020008.03f40695@enous
This commit is contained in:
parent
4260f5a8d7
commit
4f88116e52
|
@ -332,11 +332,12 @@ When ENTRY is non-nil, show the entire entry."
|
|||
'outline))))
|
||||
|
||||
(defun org-fold-subtree (flag)
|
||||
"Hide (when FLAG) or reveal subtree at point."
|
||||
(save-excursion
|
||||
(org-back-to-heading t)
|
||||
(org-fold-region
|
||||
(line-end-position)
|
||||
(progn (org-end-of-subtree t) (point))
|
||||
(progn (org-end-of-subtree t t) (if (eobp) (point) (1- (point))))
|
||||
flag
|
||||
'outline)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue