Questions tagged [let-binding]
The let-binding tag has no summary.
63 questions
2 votes
2 answers
81 views
Let-binding of function
(First time poster here; I tried to follow guidelines, but please tell me if I should do something differently.) How does one go about "let-binding" a function as to temporarily replace a ...
0 votes
1 answer
37 views
Is it possible to pass a setf place (generalized variable) as an argument to a function?
I'm learning about generalized variables (the setf place argument) and have a hypothetical question: Can a generalized variable be passed as an argument to a function, allowing the function to mutate ...
0 votes
0 answers
50 views
How to override window-state-change-functions in a function
I have tried: (defun winnie-set-relative (step) (cl-letf ((window-state-change-functions nil)) (my-function))) This is my package: https://github.com/QiangF/emacs-winnie. It can be improved if ...
1 vote
1 answer
134 views
Check value of local variable assigned with let/let* editing org-export functions
On my way learning emacs and doing some first steps in elisp programming, I'm trying to adapt the LaTeX output of org-export. It's a lot learning by doing and that's a good thing since it improves my ...
0 votes
1 answer
55 views
How can I let-bind a variable to input read with `completing-read`?
How can I store the selected value in a let variable when using completing-read ? (let ( (selc '("Lower-Skeleton" "Upper-Skeleton")) ) (completing-read "Vista: " selc ...
2 votes
1 answer
369 views
Enable Lexical Binding by Binding “lexical-binding” to t
(Please see what is letrec first.) The following code is obviously fine and self-explanatory: ;; -*- lexical-binding: t; -*- (setq post-self-insert-hook `(,@(when (boundp 'post-self-insert-hook) ...
0 votes
0 answers
43 views
Updating old customization code using deprecated lexical-let
Old code (lexical-let ((beg -1) (end -1) (prev-mid -1)) (defun forward-binary () (interactive) (if (/= prev-mid (point)) (setq beg -1 end -1) (setq beg prev-mid)) (if ...
0 votes
2 answers
254 views
Any way to access a lexical let variable outside of the let?
I need to retrieve a local, lexical, runtime variable from a function, but I'm unable to modify the function to return it because it is from an external library. The variable I'm unable to reach is ...