lang/org: realign/recalculate tables on exit evil replace mode

This commit is contained in:
Henrik Lissner 2018-05-30 01:45:35 +02:00
parent c63cd0a688
commit 49f16f681c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 14 additions and 5 deletions

View file

@ -307,9 +307,16 @@ wrong places)."
(defun +org|realign-table-maybe ()
"Auto-align table under cursor and re-calculate formulas."
(when (and (org-at-table-p) org-table-may-need-update)
(quiet!
(org-table-recalculate)
(if org-table-may-need-update (org-table-align)))))
(save-excursion
(quiet!
(org-table-recalculate)
(if org-table-may-need-update (org-table-align))))))
;;;###autoload
(defun +org*realign-table-maybe (&rest _)
"Auto-align table under cursor and re-calculate formulas."
(when (eq major-mode 'org-mode)
(+org|realign-table-maybe)))
;;;###autoload
(defun +org|update-cookies ()