Have been playing with the following function
(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
Meaning that inside the function, the argument featr
is only changed locally, whereas getting back from the function keeps the value of featr
to sweep
before calling the function.
Is this the way things work in elisp? Does changing the value of an argument inside a function tolerable?
Would programmers looking at the code usually complain if someone changes argument value inside the function?
With the transition to lexical binding, would this code still be valid?