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

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

[elpa] externals/crdt ceb2b98 4/4: Merge branch 'fix' into 'master'


From: ELPA Syncer
Subject: [elpa] externals/crdt ceb2b98 4/4: Merge branch 'fix' into 'master'
Date: Tue, 31 Aug 2021 02:57:09 -0400 (EDT)

branch: externals/crdt
commit ceb2b982922cd9829485db21abdb273b9e1fa98a
Merge: 70ae7ba 58cb983
Author: Qiantan Hong <qhong@mit.edu>
Commit: Qiantan Hong <qhong@mit.edu>

    Merge branch 'fix' into 'master'
    
    Fix
    
    See merge request qhong/crdt.el!3
---
 crdt.el | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/crdt.el b/crdt.el
index 727e055..458834c 100644
--- a/crdt.el
+++ b/crdt.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Qiantan Hong <qhong@alum.mit.edu>
 ;; URL: https://code.librehq.com/qhong/crdt.el
 ;; Keywords: collaboration crdt
-;; Version: 0.1.2
+;; Version: 0.1.3
 
 ;; This file is part of GNU Emacs.
 
@@ -30,12 +30,10 @@
 
 ;;; Customs
 
-(require 'xdg)
+(require 'xdg nil t)
 (require 'cl-lib)
-(require 'subr-x)
 (require 'url)
 (require 'color)
-(require 'files)
 
 (defgroup crdt nil
   "Collaborative editing using Conflict-free Replicated Data Types."
@@ -65,7 +63,7 @@
   "Path to the tuntox binary."
   :type 'file)
 
-(defcustom crdt-tuntox-key-path (xdg-data-home)
+(defcustom crdt-tuntox-key-path (if (featurep 'xdg) (xdg-data-home) "~/")
   "Path to save tuntox's private key."
   :type 'directory)
 
@@ -353,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."
@@ -401,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)
@@ -1636,7 +1639,7 @@ Setup up the server with PASSWORD and assign this Emacs 
DISPLAY-NAME."
                              :buffer (generate-new-buffer "*Tuntox Proxy*")
                              :command
                              `(,crdt-tuntox-executable
-                               "-C" ,crdt-tuntox-key-path
+                               "-C" ,(expand-file-name crdt-tuntox-key-path)
                                "-f" "/dev/stdin" ; do the filtering for safety 
sake
                                ,@ (when (and password (> (length password) 0))
                                     `("-s" ,password))))))



reply via email to

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