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

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

[elpa] externals/lentic e0840dbfe6 082/333: Stop location now calculated


From: ELPA Syncer
Subject: [elpa] externals/lentic e0840dbfe6 082/333: Stop location now calculated from before functions.
Date: Tue, 27 Feb 2024 13:00:09 -0500 (EST)

branch: externals/lentic
commit e0840dbfe6c798966f6bfb46bb4250144efffe73
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Stop location now calculated from before functions.
---
 linked-buffer.el | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/linked-buffer.el b/linked-buffer.el
index b8a7a1eb1c..5c0b7ddcc0 100644
--- a/linked-buffer.el
+++ b/linked-buffer.el
@@ -178,6 +178,9 @@ of mode in the current buffer.")
     :initform t)
    (last-change-start-converted
     :initarg :last-change-start-converted
+    :initform nil)
+   (last-change-stop-converted
+    :initarg :last-change-stop-converted
     :initform nil))
   "Configuration object for linked-buffer, which defines the mechanism
 by which linking happens.")
@@ -306,24 +309,17 @@ Currently, this is just a clone all method but may use 
regions in future."
              ;; buffers do not share state until we have percolated it
              (converted-start
               (or (oref conf :last-change-start-converted)
-                  (point-min))))
+                  (point-min)))
+             (converted-stop
+              (or (oref conf :last-change-stop-converted)
+                  (point-max))))
         ;; used this, so dump it
         (oset conf :last-change-start-converted nil)
+        (oset conf :last-change-stop-converted nil)
         (with-current-buffer that-b
           (delete-region (max (point-min) converted-start)
-                         (min (point-max)
-                              (+ length-before
-                                 converted-start)))
-          (linked-buffer-log
-           "delete (from,to):(%s,%s)"
-           (max (point-min) converted-start)
-           (min (point-max)
-                (+ length-before
-                   converted-start)))
-
+                         (min (point-max) converted-stop))
           (save-excursion
-            (linked-buffer-log "(point,start,converted):(%s,%s,%s)"
-                               (point) start converted-start)
             (goto-char converted-start)
             ;; so this insertion is happening at the wrong place in block
             ;; comment -- in fact, it's happening one too early
@@ -336,7 +332,7 @@ Currently, this is just a clone all method but may use 
regions in future."
                  (propertize
                   (buffer-substring-no-properties
                    start stop)
-                  'font-lock-face 'error))))))))))
+                  'font-lock-face 'font-lock-type-face))))))))))
 
 (defun linked-buffer-default-init ()
   "Default init function.
@@ -574,7 +570,12 @@ REST is currently ignored. Currently this does nothing."
                :last-change-start-converted
                (linked-buffer-convert
                 linked-buffer-config
-                start)))
+                start))
+         (oset linked-buffer-config
+               :last-change-stop-converted
+               (linked-buffer-convert
+                linked-buffer-config
+                stop)))
         (linked-buffer-log
          "Before-change:%s" rest)
         (lambda ())



reply via email to

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