branch: elpa/magit
commit 96ecf74563774bd3d0763269af5eafda7d140f98
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Revert "No longer use buffer-local-value as a generalized variable"
This reverts commit b458db3263d11677a9d002a2a95ec86f29f32728.
It has been un-deprecated. It was temporarily marked as obsolete
during the development of Emacs 29.1.
Using `setf' for the place is unproblematic, however, using it with
`cl-letf' leads to surprising results -- but that's not what we are
doing here.
Re (debbugs-gnu-bugs 26624 65555).
Re https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01406.html.
---
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 71721eb20ec..4e17ce38539 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)))
- (with-current-buffer bufB* (setq buffer-read-only nil))
+ (setf (buffer-local-value 'buffer-read-only bufB*) 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
- (with-current-buffer bufB (setq buffer-read-only t)))
+ (setf (buffer-local-value 'buffer-read-only bufB) t))
(when (buffer-modified-p ediff-buffer-B)
(with-current-buffer ediff-buffer-B
(magit-update-index))))