lang/org: refactor +org|realign-table-maybe

This commit is contained in:
Henrik Lissner 2018-03-22 14:41:46 -04:00
parent 48f5811e0d
commit 1b9c5befb4
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -327,9 +327,10 @@ with `org-cycle'). Also:
;;;###autoload
(defun +org|realign-table-maybe ()
"Auto-align table under cursor and re-calculate formulas."
(when (org-at-table-p)
(save-excursion
(quiet! (org-table-recalculate)))))
(when (and (org-at-table-p) org-table-may-need-update)
(quiet!
(org-table-recalculate)
(if org-table-may-need-update (org-table-align)))))
;;;###autoload
(defun +org|update-cookies ()