[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 4bc9fe33af: Rename 'elisp-eval-buffer' to 'elisp-eval-region-

From: Stefan Monnier
Subject: Re: master 4bc9fe33af: Rename 'elisp-eval-buffer' to 'elisp-eval-region-or-buffer' (bug#59350)
Date: Sun, 20 Nov 2022 15:04:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>>>     * lisp/progmodes/elisp-mode.el (elisp-eval-region-or-buffer):
>>>     Rename recently added command 'elisp-eval-buffer' to support active 
>>> region.
>>>     (emacs-lisp-mode-map, lisp-interaction-mode-map): Rebind 'C-c C-e'
>>>     from elisp-eval-buffer to elisp-eval-region-or-buffer.
>> Could we make it do the `eval-sexp-add-defvars` dance when evaluating a 
>> region?
> Not sure how to do this on the region that might contain several expressions.
> Currently it's used only on a single expression in elisp--eval-last-sexp
> and elisp--eval-defun.

I think the way to do that is to let `eval_region` take an initial
environment as argument (just like `eval`), and then populate this env
based on the `defvar`s found before the region.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]