Subject: Re: bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't restore local flag

From: Michael Heerdegen <[email-masked]>
Date: Wed, 27 Dec 2017 20:54:28 +0100

Eli Zaretskii <[email-masked]> writes:

> In any case, I don't think I understand the suggestion in detail.  Can
> you show a patch or an idea of a patch?

Maybe simply something like this?

>From 5bc85fadc201eb7d061fe585283f0f4e44f0d910 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <[email-masked]>
Date: Wed, 27 Dec 2017 20:46:20 +0100
Subject: [PATCH] Obsolete gv-setter of `buffer-local-value'

This solves Bug#26624.
---
 lisp/emacs-lisp/gv.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 777b955d90..f0aad6689d 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -370,6 +370,7 @@ setf
 (gv-define-setter window-start (v &optional w) `(set-window-start ,w ,v))
 
 (gv-define-setter buffer-local-value (val var buf)
+  (byte-compile-warn "Warning: obsolete gv-setter: `buffer-local-value'")
   (macroexp-let2 nil v val
     `(with-current-buffer ,buf (set (make-local-variable ,var) ,v))))
 
-- 
2.15.1

Michael.