* funcall not required for external function defined by defun
@ 2024-07-11 0:04 Heime
2024-07-11 8:00 ` Manuel Giraud via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 2+ messages in thread
From: Heime @ 2024-07-11 0:04 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
I have a function that includes the following code. Why do I need to call `funcall'
to execute the function (nth i fcvsec), but `funcall' is not required if fcv2 was
an external function defined by `defun' ?
(let ( (lbv2 (nth i lbvsec))
(fcv2 (nth i fcvsec)) )
(if lbv2
(progn
(insert-button "[-]"
'action (lambda (b)
(mpdu-fyr-lskpt monbf lbv2 "red" (point))
(funcall fcv2)))
(insert (format (format "%%s%%-%ds" kwd) spx lbv2)))
(insert (make-string zwd ?\s))))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: funcall not required for external function defined by defun
2024-07-11 0:04 funcall not required for external function defined by defun Heime
@ 2024-07-11 8:00 ` Manuel Giraud via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 2+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2024-07-11 8:00 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
Heime <heimeborgia@protonmail.com> writes:
> I have a function that includes the following code. Why do I need to call `funcall'
> to execute the function (nth i fcvsec), but `funcall' is not required if fcv2 was
> an external function defined by `defun' ?
Because here the "function definition" of the symbol 'fcv2 is not bound.
Only its "value cell" is (to the function contained in (nth i fcvsec)).
See:
(elisp) Function Cells
(elisp) Void Variables
--
Manuel Giraud
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-11 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 0:04 funcall not required for external function defined by defun Heime
2024-07-11 8:00 ` Manuel Giraud via Users list for the GNU Emacs text editor
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).