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

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

[elpa] externals/lentic e338bfabbc 166/333: Only use lentic-this/that fo


From: ELPA Syncer
Subject: [elpa] externals/lentic e338bfabbc 166/333: Only use lentic-this/that for access.
Date: Tue, 27 Feb 2024 13:00:30 -0500 (EST)

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

    Only use lentic-this/that for access.
    
    Previously I was accessing slots directly, but this breaks some of the
    code in lentic-delayed which overrides the lentic-this/that methods.
---
 lentic-block.el | 26 +++++++++++++-------------
 lentic.el       | 12 ++++++------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/lentic-block.el b/lentic-block.el
index 12af641351..86afb65d0f 100644
--- a/lentic-block.el
+++ b/lentic-block.el
@@ -264,16 +264,16 @@ between the two buffers; we don't care which one has 
comments."
         (when
             (and start
                  (m-buffer-at-bolp
-                  (oref conf :that-buffer)
+                  (lentic-that conf)
                   start-converted))
           (m-buffer-at-line-beginning-position
-           (oref conf :this-buffer)
+           (lentic-this conf)
            start)))
        (start (or start-in-comment start))
        (start-converted
         (if start-in-comment
           (m-buffer-at-line-beginning-position
-           (oref conf :that-buffer)
+           (lentic-that conf)
            start-converted)
           start-converted))
        ;; likewise for stop
@@ -281,16 +281,16 @@ between the two buffers; we don't care which one has 
comments."
         (when
             (and stop
                  (m-buffer-at-bolp
-                  (oref conf :that-buffer)
+                  (lentic-that conf)
                   stop-converted))
           (m-buffer-at-line-end-position
-              (oref conf :this-buffer)
+              (lentic-this conf)
               stop)))
        (stop (or stop-in-comment stop))
        (stop-converted
         (if stop-in-comment
             (m-buffer-at-line-end-position
-                (oref conf :that-buffer)
+                (lentic-that conf)
                 stop-converted)
           stop-converted)))
     ;; log when we have gone long
@@ -300,7 +300,7 @@ between the two buffers; we don't care which one has 
comments."
                              "start")
                            (when stop-in-comment
                              "stop")))
-        ;; now clone the buffer
+    ;; now clone the buffer
     (call-next-method conf start stop length-before
                       start-converted stop-converted)
     ;; remove the line comments in the to buffer
@@ -333,8 +333,8 @@ between the two buffers; we don't care which one has 
comments."
   ((conf lentic-commented-block-configuration))
   (lentic-uncommented-block-configuration
    "commented-inverted"
-   :this-buffer (oref conf :that-buffer)
-   :that-buffer (oref conf :this-buffer)
+   :this-buffer (lentic-that conf)
+   :that-buffer (lentic-this conf)
    :comment (oref conf :comment)
    :comment-start (oref conf :comment-start)
    :comment-stop (oref conf :comment-stop)))
@@ -361,10 +361,10 @@ between the two buffers; we don't care which one has 
comments."
         (when
             (and start
                  (m-buffer-at-bolp
-                  (oref conf :this-buffer)
+                  (lentic-this conf)
                   start))
           (m-buffer-at-line-beginning-position
-              (oref conf :that-buffer)
+              (lentic-that conf)
               start-converted)))
        (start-converted (or start-at-bolp start-converted)))
     (if (or start-at-bolp)
@@ -400,8 +400,8 @@ between the two buffers; we don't care which one has 
comments."
   ((conf lentic-uncommented-block-configuration))
   (lentic-commented-block-configuration
    "uncommented-inverted"
-   :this-buffer (oref conf :that-buffer)
-   :that-buffer (oref conf :this-buffer)
+   :this-buffer (lentic-that conf)
+   :that-buffer (lentic-this conf)
    :comment (oref conf :comment)
    :comment-start (oref  conf :comment-start)
    :comment-stop (oref conf :comment-stop)))
diff --git a/lentic.el b/lentic.el
index b5214bdd05..65a24937cb 100644
--- a/lentic.el
+++ b/lentic.el
@@ -296,8 +296,8 @@ created."
 (defmethod lentic-invert ((conf lentic-default-configuration))
   (lentic-default-configuration
    (lentic-config-name (lentic-that conf))
-   :this-buffer (oref conf :that-buffer)
-   :that-buffer (oref conf :this-buffer)))
+   :this-buffer (lentic-that conf)
+   :that-buffer (lentic-this conf)))
 
 (defmethod lentic-convert ((conf lentic-default-configuration)
                                   location)
@@ -311,8 +311,8 @@ the lentic."
   "Updates that-buffer to reflect the contents in this-buffer.
 
 Currently, this is just a clone all method but may use regions in future."
-  (let ((this-b (oref conf :this-buffer))
-        (that-b (oref conf :that-buffer)))
+  (let ((this-b (lentic-this conf))
+        (that-b (lentic-that conf)))
     (with-current-buffer this-b
       ;;(lentic-log "this-b (point,start,stop)(%s,%s,%s)" (point) start stop)
       (save-restriction
@@ -596,14 +596,14 @@ update mechanism depends on conf."
                      (oref conf :last-change-start-converted))
               (set-marker (make-marker)
                           (oref conf :last-change-start-converted)
-                          (oref conf :that-buffer))))
+                          (lentic-that conf))))
            (stop-converted
             (when
                 (and (not skewed)
                      (oref conf :last-change-stop-converted))
               (set-marker (make-marker)
                           (oref conf :last-change-stop-converted)
-                          (oref conf :that-buffer)))))
+                          (lentic-that conf)))))
         ;; used these, so dump them
         (oset conf :last-change-start nil)
         (oset conf :last-change-start-converted nil)



reply via email to

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