Questions tagged [funcall]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
24 views

Function within a function produces side-effect but failes to deliver logic test

This is a simple logic test that makes use of down-list and asks if another nested pair of parenthesis exits or not. (not (eql (point) (progn (ignore-errors (down-list)) (point))...
0
votes
1answer
24 views

Why funcall doesn't work from a closure

I'm having difficulty to call a function passed as an argument. Why the following snippet doesn't work, and how can I make it work? lexical-binding is set to t (defun on-success (data) (print "...
0
votes
1answer
30 views

Evaluate allows for combinations whose operators are compound expressions

I find the amazing power of scheme in sicp Exercise 1.4. Observe that our model of evaluation allows for combinations whose operators are compound expressions. Use this observation to describe ...
1
vote
2answers
53 views

I want to simplify repeated calls in my init.el file

I've got a lot of: (desktop-save-mode 1) (show-paren-mode 1) which I'd like to collapse into: (mapcar (lambda (fn) (fn 1)) '(desktop-save-mode show-paren-mode)) but I get an error: Symbol’s ...
2
votes
1answer
131 views

Difference between apply and funcall

(describe-function apply) says: apply is a built-in function in ‘src/eval.c’. ...
0
votes
0answers
57 views

Defining function that takes funciton as argument results in “Wrong type argument: commandp, (bm-my bm-next)”

When using the below and invoking the function via <leader>Bn I get an error of command-execute: Wrong type argument: commandp, (bm-my bm-next) (defun bm-my (a) (interactive) (a) (bm-show-...
0
votes
1answer
111 views

function that takes a function as argument and returns a new function

I'd like to write an elisp-function that has a function as argument and returns a new function. Let's say the new function double-the-function should write the returned value of the argument-function ...
4
votes
2answers
164 views

Calling a function with a shorter but unknown argument signature length

Is there a terse idiomatic way of calling a function in the manner of funcall (dereferencing function symbols) when that function may have a variably shorter function signature? Say for example: a ...