branch: elpa/magit
commit f748702fa326022f985e790985a16263a45b09c2
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
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 4e17ce38539..71721eb20ec 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))))