]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind cross-buffer buffer-local variable correctly.
authorAlan Mackenzie <acm@muc.de>
Thu, 11 Jan 2024 17:54:47 +0000 (17:54 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 11 Jan 2024 17:54:47 +0000 (17:54 +0000)
This fixes bug#68200.

* lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform):
Note that let-binding a buffer local variable leaves it buffer
local, hence to transfer the binding of
byte-compile-dynamic-docstrings to the output buffer, an
intermediate variable is needed.  Implement this.

lisp/emacs-lisp/bytecomp.el

index 2bc8d54ba7738635d3bfcc732d3cb64b3e804422..ea9298c66464135e17dedca4c633adf15e34efbb 100644 (file)
@@ -2605,9 +2605,10 @@ list that represents a doc string reference.
 `defvaralias', `autoload' and `custom-declare-variable' need that."
   ;; We need to examine byte-compile-dynamic-docstrings
   ;; in the input buffer (now current), not in the output buffer.
-  (let ((byte-compile-dynamic-docstrings byte-compile-dynamic-docstrings))
+  (let ((dynamic-docstrings byte-compile-dynamic-docstrings))
     (with-current-buffer byte-compile--outbuffer
-      (let ((position (point))
+      (let ((byte-compile-dynamic-docstrings dynamic-docstrings)
+            (position (point))
             (print-continuous-numbering t)
             print-number-table
             ;; FIXME: The bindings below are only needed for when we're