unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* sending function arguments to recursive function calls
@ 2013-05-04 13:01 Gauthier Östervall
  2013-05-04 15:30 ` Drew Adams
  2013-05-05  1:22 ` Stefan Monnier
  0 siblings, 2 replies; 21+ messages in thread
From: Gauthier Östervall @ 2013-05-04 13:01 UTC (permalink / raw)
  To: help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-05-21 16:34 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-04 13:01 sending function arguments to recursive function calls Gauthier Östervall
2013-05-04 15:30 ` Drew Adams
2013-05-07 11:25   ` Gauthier Östervall
2013-05-07 14:04     ` Drew Adams
2013-05-08 12:21       ` Stefan Monnier
2013-05-09  8:35         ` Gauthier Östervall
2013-05-09 12:23           ` Stefan Monnier
2013-05-12 13:19             ` Gauthier Östervall
2013-05-13 14:55               ` Stefan Monnier
2013-05-17 12:20                 ` Gauthier Östervall
2013-05-17 12:26                   ` Dmitry Gutov
2013-05-17 14:31                     ` Drew Adams
2013-05-19 16:57                       ` Dmitry Gutov
2013-05-21 16:34                         ` Drew Adams
     [not found]                       ` <mailman.70.1368982677.22516.help-gnu-emacs@gnu.org>
2013-05-19 20:59                         ` Pascal J. Bourguignon
2013-05-20 19:31                           ` Dmitry Gutov
     [not found]                           ` <mailman.94.1369078320.22516.help-gnu-emacs@gnu.org>
2013-05-20 19:55                             ` Pascal J. Bourguignon
2013-05-07 14:32     ` Pascal J. Bourguignon
     [not found]     ` <mailman.25279.1367935468.855.help-gnu-emacs@gnu.org>
2013-05-07 14:55       ` Pascal J. Bourguignon
2013-05-08 12:25         ` Stefan Monnier
2013-05-05  1:22 ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).