Questions tagged [scope]

The tag has no usage guidance.

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

Bring setq variable into a (let ...) context of a elisp function?

I have written a function snippet that copies a paragraph to the kill-ring. I try to collect different point positions and corresponding line numbers: bop - begin of paragraph blnum - line umber of ...
huckfinn's user avatar
  • 113
0 votes
2 answers
84 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 ...
sextrism's user avatar
0 votes
1 answer
73 views

Why is my variable out of scope in org-roam-capture?

I would like to define an function using org-roam's capture system. However, I want to create a new function, not use the variable org-roam-capture-templates and the related function org-roam-capture. ...
jrasband's user avatar
3 votes
3 answers
302 views

How does scoping work in emacs lisp

A lot of emacs configurations shared publicly have this format: ;; 01-something.el (provide 'something) ;; init.el (require 'something) Suppose I'm writing a defun named "s-join" inside 01-...
american-ninja-warrior's user avatar
0 votes
1 answer
51 views

How create custom function access only from ONE el file?

Emacs 26.1 In my file custom_functions.el (defun increment-number-by-one-at-point() (interactive) (increment-number-at-point-private 1)) ;; Increment number at point (defun increment-number-at-...
a_subscriber's user avatar
  • 3,926
4 votes
2 answers
334 views

How to highlight the current scope with C family languages?

While it's possible to highlight a block using the character under the cursor, is there a way to highlight the scope of the current cursor? I'm interested in something like QtCreator's block-...
ideasman42's user avatar
  • 8,556
1 vote
1 answer
302 views

Are there other ways of introducing local variables other than `let`

I am new to Emacs-Lisp and I was surprised to learn a curious variable scoping rule in Emacs that any variables which are intended to be used locally must be explicitly declared with let. Otherwise ...
smilingbuddha's user avatar