[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0c899ee: Make `make-local-variable' declare the var locally dynam
From: |
Michael Heerdegen |
Subject: |
master 0c899ee: Make `make-local-variable' declare the var locally dynamic |
Date: |
Thu, 30 Apr 2020 15:07:16 -0400 (EDT) |
branch: master
commit 0c899eede338e8e1e349ddcdaf88723569d48f8d
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>
Make `make-local-variable' declare the var locally dynamic
The only effect of this change is to get rid of some unnecessary
"assignment to free variable" warnings.
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-local-variable): New
function.
---
lisp/emacs-lisp/bytecomp.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 13b7219..72dbfd7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4752,6 +4752,14 @@ binding slots have been popped."
(defun byte-compile-form-make-variable-buffer-local (form)
(byte-compile-keep-pending form 'byte-compile-normal-call))
+;; Make `make-local-variable' declare the variable locally
+;; dynamic - this suppresses some unnecessary warnings
+(byte-defop-compiler-1 make-local-variable
+ byte-compile-make-local-variable)
+(defun byte-compile-make-local-variable (form)
+ (pcase form (`(,_ ',var) (byte-compile--declare-var var)))
+ (byte-compile-normal-call form))
+
(put 'function-put 'byte-hunk-handler 'byte-compile-define-symbol-prop)
(put 'define-symbol-prop 'byte-hunk-handler 'byte-compile-define-symbol-prop)
(defun byte-compile-define-symbol-prop (form)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0c899ee: Make `make-local-variable' declare the var locally dynamic,
Michael Heerdegen <=