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

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

[elpa] externals/crdt 58cb983 3/4: Fix clone-indirect-buffer behavior


From: ELPA Syncer
Subject: [elpa] externals/crdt 58cb983 3/4: Fix clone-indirect-buffer behavior
Date: Tue, 31 Aug 2021 02:57:09 -0400 (EDT)

branch: externals/crdt
commit 58cb983a8df2bb9405623934d80dad932f454cc6
Author: Qiantan Hong <qhong@mit.edu>
Commit: Qiantan Hong <qhong@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)



reply via email to

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