From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@linkov.net>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <jwv8rk52y30.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86h6ytsb07.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 20 Nov 2022 21:04:40 +0200")
>>> * 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.
Stefan
prev parent reply other threads:[~2022-11-20 20:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <166896786767.14676.4958515969410235651@vcs2.savannah.gnu.org>
[not found] ` <20221120181108.02832C00613@vcs2.savannah.gnu.org>
2022-11-20 18:52 ` master 4bc9fe33af: Rename 'elisp-eval-buffer' to 'elisp-eval-region-or-buffer' (bug#59350) Stefan Monnier
2022-11-20 19:04 ` Juri Linkov
2022-11-20 20:04 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv8rk52y30.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).