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

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

[elpa] externals/lentic 849dc0dc24 209/333: Default mode is now the same


From: ELPA Syncer
Subject: [elpa] externals/lentic 849dc0dc24 209/333: Default mode is now the same as main buffer.
Date: Tue, 27 Feb 2024 13:00:35 -0500 (EST)

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

    Default mode is now the same as main buffer.
    
    This makes more sense anyway -- it makes two buffers clones of each
    other like indirect buffer
---
 lentic.el           | 9 +++++----
 test/lentic-test.el | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lentic.el b/lentic.el
index cf1d49315d..2b99399412 100644
--- a/lentic.el
+++ b/lentic.el
@@ -214,7 +214,7 @@ of mode in the current buffer.")
 ;; #+begin_src emacs-lisp
 ;;
 ;; Base Configuration:
-;;
+
 (defclass lentic-configuration ()
   ((this-buffer
     :initarg :this-buffer)
@@ -306,7 +306,7 @@ for lots of things at once. Returns OBJ."
     :initform nil
     :initarg :lentic-file)
    (lentic-mode
-    :initform 'normal-mode
+    :initform nil
     :initarg :lentic-mode))
   "Configuration which maintains two lentics with the same contents.")
 
@@ -332,7 +332,9 @@ created."
            (format "*lentic: %s*"
                    (buffer-name
                     this-buffer))))
-         (sec-mode (oref conf :lentic-mode))
+         (sec-mode
+          (or (oref conf :lentic-mode)
+              major-mode))
          (sec-file (oref conf :lentic-file)))
     (oset conf :creator t)
     ;; make sure this-buffer knows about that-buffer
@@ -620,7 +622,6 @@ rest is currently just ignored."
    (lentic-update-contents lentic-config
                            start stop length-before)))
 
-
 ;; convert the start position and store it. we need to do this before
 ;; the change so that we can use the value during clone. after the
 ;; change, this-buffer and that-buffer will have different contents
diff --git a/test/lentic-test.el b/test/lentic-test.el
index c95a0f6274..31aaeb0337 100644
--- a/test/lentic-test.el
+++ b/test/lentic-test.el
@@ -83,7 +83,7 @@
 
 (ert-deftest lentic-conf ()
   (should
-   (equal 'normal-mode
+   (equal nil
           (oref
            (lentic-default-configuration "bob")
            :lentic-mode))))



reply via email to

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