branch: externals/crdt commit 58cb983a8df2bb9405623934d80dad932f454cc6 Author: Qiantan Hong <qh...@mit.edu> Commit: Qiantan Hong <qh...@mit.edu>
Fix clone-indirect-buffer behavior Disable crdt-mode entirely in the cloned buffer for now. --- crdt.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crdt.el b/crdt.el index 2a07b7e..458834c 100644 --- a/crdt.el +++ b/crdt.el @@ -351,7 +351,9 @@ Each element is of the form (CURSOR-OVERLAY . REGION-OVERLAY).") (before-change-functions . crdt--before-change) (post-command-hook . crdt--post-command) (deactivate-mark-hook . crdt--post-command) - (kill-buffer-hook . crdt--kill-buffer-hook))) + (kill-buffer-hook . crdt--kill-buffer-hook) + (clone-buffer-hook . crdt--clone-buffer-hook) + (clone-indirect-buffer-hook . crdt--clone-buffer-hook))) (defun crdt--install-hooks () "Install the hooks used by CRDT-MODE." @@ -399,6 +401,9 @@ Also set CRDT--PSEUDO-CURSOR-TABLE to NIL." (crdt--clear-pseudo-cursor-table) (setq crdt--overlay-table nil))) +(defun crdt--clone-buffer-hook () + (crdt-mode -1)) + ;;; Author visualization (defsubst crdt--visualize-author-1 (beg end site)