Questions tagged [local-functions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
120 views

Are local nested functions possible in elisp?

It it possible to declare functions whose names are only available in the scope of another function, similar to let? e.g.: (defun my-fn (x y) (let ((my-local-fn (lambda (a b) (message "%S" (- a b)...
0
votes
1answer
127 views

Recursion with let and cl-labels or just cl-letf?

I found this code on stackoverflow (from Rainer Joswig): (defun listFormat () (cl-labels ((place-index (idx l) (if (null l) nil (append (list (first l)) (list idx) ...
7
votes
1answer
1k views

Override a function locally, but allow calls to the original function

The advice feature allows modifying the behavior of a function globally. An advice definition can make calls to the original function. (defadvice foo (around foo-bar activate compile) "Always set ...
12
votes
1answer
472 views

Emacs let-bound advice

I'd like to temporarily override a function in a piece of code. Take, for example, the following: (defun nadvice/load-quiet (args) (cl-destructuring-bind (file &optional noerror ...