[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Effect of lexical binding upon function paramaters
From: |
Heime |
Subject: |
Effect of lexical binding upon function paramaters |
Date: |
Thu, 03 Nov 2022 11:01:01 +0000 |
Now that files will use lexical binding, would there be any implications
to the following code?
(defun ignition (featr actm)
"TODO."
(when (eq 'sweep featr) (setq featr 'icomplt))
(message "%S" featr))
Calling the following sequence of commands
(setq featr 'sweep)
(ignition featr actm)
(message "%S" featr)
gives the following result
icomplt
sweep
This means that paramaters of the function definition become local variables
within the function body.
Does this behaviour change upon whether lexical or dynamic binding is used.
What should be the correct
approach now that lexical binding is the usual way to proceed?
- Effect of lexical binding upon function paramaters,
Heime <=