branch: externals/preview-auto
commit 94c6233389745cdb96eecef6ad3d723507e8fa8f
Author: Paul Nelson <[email protected]>
Commit: Paul Nelson <[email protected]>
Add missing pre-command-hook for preview-mark-point
* preview-auto.el (preview-auto-mode): Add 'preview-mark-point' to
'pre-command-hook' (the counterpart to 'preview-move-point', which was
already added to 'post-command-hook').
---
preview-auto.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/preview-auto.el b/preview-auto.el
index 71eff94680..e3067b3ce5 100644
--- a/preview-auto.el
+++ b/preview-auto.el
@@ -548,6 +548,8 @@ cancel the preview, so that the preview is not misplaced."
(regexp-quote TeX-esc)
(regexp-quote TeX-esc)
"\\)*\\)\\(%+[ \t]*\\)")))
+ (unless (memq #'preview-mark-point pre-command-hook)
+ (add-hook 'pre-command-hook #'preview-mark-point nil t))
(unless (memq #'preview-move-point post-command-hook)
(add-hook 'post-command-hook #'preview-move-point nil t))
(add-hook 'after-change-functions #'preview-auto--after-change nil t)