We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [local-functions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
42 views

Is it possible to make a function local to the buffer?

I want to override the function helm-swoop-pre-input-optimize in man mode using its hook, but not anywhere else. Is there something similar to make-local-variable for functions?
2
votes
3answers
263 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
145 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 ...
13
votes
1answer
517 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 ...