mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-06 20:49:33 +00:00
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.
This commit is contained in:
parent
691f19798a
commit
0c899eede3
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user