Questions tagged [dynamic-scoping]
The dynamic-scoping tag has no summary.
28 questions
5 votes
1 answer
305 views
Variable scope issue in scratch buffer?
I encountered an issue with the following code, provided by NickD as an answer to a previous question (link to the question): (defun my-add-string-to-list (LIST-VAR STRING) (add-to-list LIST-VAR ...
0 votes
0 answers
67 views
dynamic scoping doesn't perform as expected
(require 'cl) (require 'seq) (require 'dash) (eval-when-compile (require 'cl-lib) (require 'subr-x) (require 'env) (require 'json)) (defgroup chatgpt nil "ChatGPT frontend." :...
1 vote
1 answer
124 views
Warning: assignment to free variable ‘skeleton-pair’
Am using the following function, but getting the error In bracemk-balance: fencones.el:109:9:Warning: assignment to free variable ‘skeleton-pair’ What is wrong with this? (defun bracemk-balance ()...
4 votes
1 answer
103 views
why is a let binding is ignored in compiled function?
I have this function which works perfectly in an uncompiled function. It should let-bind the variable bibtex-completion-bibliography to the result of (org-ref-find-bibliography). (defun org-ref-...
1 vote
1 answer
63 views
Inconsistency in emacs' rules of scope?
I have always felt that emacs' rules of scope are a bit strange and prone to contradictions. In fact I have even attempted to file bug reports just to be told that my interpretation of the rules of ...
1 vote
0 answers
336 views
How to override a value inside a function temporarily?
There is this function in tide: ;; Defined in ~/.emacs.d/.local/straight/repos/tide/tide.el (defun tide-rename-file () "Rename current file and all it's references in other files." (...
3 votes
1 answer
255 views
How does one "extend" an existing function?
What I want to do: have the function evil-delete do one more task after its usual code. (I'm presuming that evil-delete is the underlying workhorse that is called by evil-delete-line and about five ...
2 votes
0 answers
129 views
Can I set a variable scoped to a perspective?
I have a large monorepo repository and open different parts of it in a persp-mode perspective. It would be nice if for all buffers owned by that perspective I could set for example projectile-project-...