org.el: Minor refactoring

* lisp/org.el (org-indent-line): Minor refactoring.
This commit is contained in:
Bastien 2020-02-09 00:15:30 +01:00
parent 08815085fe
commit 3de19f7c91
1 changed files with 2 additions and 4 deletions

View File

@ -18568,9 +18568,7 @@ list structure. Instead, use \\<org-mode-map>`\\[org-shiftmetaleft]' or \
Also align node properties according to `org-property-format'."
(interactive)
(cond
((org-at-heading-p) 'noindent)
(t
(if (org-at-heading-p) 'noindent
(let* ((element (save-excursion (beginning-of-line) (org-element-at-point)))
(type (org-element-type element)))
(cond ((and (memq type '(plain-list item))
@ -18604,7 +18602,7 @@ Also align node properties according to `org-property-format'."
(when (eq type 'node-property)
(let ((column (current-column)))
(org--align-node-property)
(org-move-to-column column)))))))))
(org-move-to-column column))))))))
(defun org-indent-region (start end)
"Indent each non-blank line in the region.