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

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

[elpa] externals/lentic e7f4d91f88 047/333: Support file-locals in linke


From: ELPA Syncer
Subject: [elpa] externals/lentic e7f4d91f88 047/333: Support file-locals in linked-buffer.
Date: Tue, 27 Feb 2024 12:59:59 -0500 (EST)

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

    Support file-locals in linked-buffer.
    
    We now add content to the buffer before selecting the major mode. This
    means that file-local-variables in the linked-buffer will be correctly
    interpreted. This was important for org-el support.
---
 linked-buffer.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/linked-buffer.el b/linked-buffer.el
index edf5e32215..af0b522e4b 100644
--- a/linked-buffer.el
+++ b/linked-buffer.el
@@ -179,7 +179,11 @@ created."
          (sec-file (oref conf :linked-file)))
     ;; make sure this-buffer knows about that-buffer
     (oset conf :that-buffer that-buffer)
+    ;; insert the contents
+    (linked-buffer-update-contents conf)
     ;; init that-buffer with mode, file and config
+    ;; the mode must be init'd after adding content in case there are any
+    ;; file-local variables need to be evaled
     (with-current-buffer that-buffer
       (when sec-mode
         (funcall sec-mode))
@@ -187,8 +191,6 @@ created."
         (set-visited-file-name sec-file))
       (setq linked-buffer-config
             (linked-buffer-invert conf)))
-    ;; and fix the contents
-    (linked-buffer-update-contents conf)
     that-buffer))
 
 (defmethod linked-buffer-invert ((conf linked-buffer-default-configuration))



reply via email to

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