help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sending function arguments to recursive function calls


From: Gauthier Östervall
Subject: sending function arguments to recursive function calls
Date: Sat, 4 May 2013 15:01:27 +0200

I am very new to e-lisp and lisp, and I expect the answer to my
question to be quite obvious when I see it.

I am puzzled by the function text-scale-adjust in lisp/face-remap.el.
The function takes (inc) as input parameter, and calls and passes this
(inc) to itself.

If I copy this function to *scratch* and evaluate the defun with C-x
C-e, I expect not to have broken anything. What happens instead is
that the function's call to itself breaks.
The line (lambda () (interactive) (text-scale-adjust (abs inc))))))
complains that inc is not defined:
"Symbol's value as variable is void: inc"

If I return to the original function in face-remap.el and evaluate the
defun there again with C-x C-e, the function starts working again.

What is the difference between the defun in face-remap.el, and its
copied version in *scratch*, that makes the propagation of inc work in
the first case but not in the second?

I vaguely suspect it has to do with autoloads, but mainly because this
is what is most obscure to me at this point.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]