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

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

[nongnu] elpa/magit f748702fa3 12/18: Reapply "No longer use buffer-loca


From: Jonas Bernoulli
Subject: [nongnu] elpa/magit f748702fa3 12/18: Reapply "No longer use buffer-local-value as a generalized variable"
Date: Sun, 22 Dec 2024 08:43:50 -0500 (EST)

branch: elpa/magit
commit f748702fa326022f985e790985a16263a45b09c2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Reapply "No longer use buffer-local-value as a generalized variable"
    
    This reverts commit 96ecf74563774bd3d0763269af5eafda7d140f98.
    
    Ah, I misread the log.  The temporary deprecation sadly did make it
    into the 29.1 release.  I thought it was un-deprecated before that.
---
 lisp/magit-ediff.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el
index 4e17ce3853..71721eb20e 100644
--- a/lisp/magit-ediff.el
+++ b/lisp/magit-ediff.el
@@ -335,7 +335,7 @@ FILE has to be relative to the top directory of the 
repository."
             (buffer-local-value 'buffer-file-coding-system bufC*))
            (bufA* (magit-find-file-noselect-1 "HEAD" file t))
            (bufB* (magit-find-file-index-noselect file t)))
-      (setf (buffer-local-value 'buffer-read-only bufB*) nil)
+      (with-current-buffer bufB* (setq buffer-read-only nil))
       (magit-ediff-buffers
        (bufA bufA*)
        (bufB bufB*)
@@ -344,7 +344,7 @@ FILE has to be relative to the top directory of the 
repository."
        (lambda ()
          (when (buffer-live-p ediff-buffer-B)
            (when lockB
-             (setf (buffer-local-value 'buffer-read-only bufB) t))
+             (with-current-buffer bufB (setq buffer-read-only t)))
            (when (buffer-modified-p ediff-buffer-B)
              (with-current-buffer ediff-buffer-B
                (magit-update-index))))



reply via email to

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