emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/valign fc4c812 044/198: * valign.el (valign-mode): Advi


From: Stefan Monnier
Subject: [elpa] externals/valign fc4c812 044/198: * valign.el (valign-mode): Advice org-table-align instead.
Date: Tue, 1 Dec 2020 18:19:13 -0500 (EST)

branch: externals/valign
commit fc4c81201df80891a653f1ce8d4c2b82340861a6
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    * valign.el (valign-mode): Advice org-table-align instead.
---
 valign.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/valign.el b/valign.el
index 07dcb77..fc8e7b8 100644
--- a/valign.el
+++ b/valign.el
@@ -553,14 +553,13 @@ When they are fontified next time."
       (progn
         (add-hook 'org-mode-hook #'valign--org-mode-hook 90)
         (add-hook 'org-agenda-finalize-hook #'valign--force-align-buffer)
+        (advice-add 'org-table-align :after #'valign-table)
         (advice-add 'org-toggle-inline-images
                     :after #'valign--force-align-buffer)
         (advice-add 'org-restart-font-lock
                     :before #'valign--realign-on-refontification)
         (advice-add 'visible-mode
                     :before #'valign--realign-on-refontification)
-        (advice-add 'org-table-next-field :after #'valign-table)
-        (advice-add 'org-table-previous-field :after #'valign-table)
         (advice-add 'org-flag-region :before #'valign--org-flag-region-advice)
         ;; Force jit-lock to refontify (and thus realign) the buffer.
         (dolist (buf (buffer-list))
@@ -578,11 +577,11 @@ When they are fontified next time."
                    (point-min) (point-max) 'valign-init nil)))))))
     (remove-hook 'org-mode-hook #'valign--org-mode-hook)
     (remove-hook 'org-agenda-finalize-hook #'valign--force-align-buffer)
+    
     (advice-remove 'org-toggle-inline-images #'valign--force-align-buffer)
     (advice-remove 'org-restart-font-lock #'valign--realign-on-refontification)
     (advice-remove 'visible-mode #'valign--realign-on-refontification)
-    (advice-remove 'org-table-next-field #'valign-table)
-    (advice-remove 'org-table-previous-field #'valign-table)
+    (advice-remove 'org-table-align #'valign-table)
     (advice-remove 'org-flag-region #'valign--org-flag-region-advice)
     (dolist (buf (buffer-list))
       (with-current-buffer buf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]