From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <166896786767.14676.4958515969410235651@vcs2.savannah.gnu.org> <20221120181108.02832C00613@vcs2.savannah.gnu.org> <86h6ytsb07.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3255"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 20 21:05:12 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owqYx-0000cF-Kd for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Nov 2022 21:05:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owqY1-0002pF-IW; Sun, 20 Nov 2022 15:04:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owqXz-0002p7-QA for emacs-devel@gnu.org; Sun, 20 Nov 2022 15:04:11 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owqXx-0002aW-8B for emacs-devel@gnu.org; Sun, 20 Nov 2022 15:04:11 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8B4ED1000E1; Sun, 20 Nov 2022 15:04:06 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 314BB100054; Sun, 20 Nov 2022 15:04:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668974645; bh=LMciqsHf4dCQmFxz24RiXZfy0KBjHxkGUUoaDEZtjlo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Zv7hBt6i5Yd+41ETibh+mDLh0PNQqhWcbbO9EN+0LwuDV8aP6QnNj+wV1hBEZaVnf aiEh/qzWEwWxiLIcB8C/sI4PxsgnO1CK1wGvV+BrRhPrhojTGujP5s5Emj0rXvvtZY UWfDiao+5af2VbsIyGTSYntzlWRNmzyjKHBvPCcv1aCZ93rYPc4+9Jcx0FvfFvhfnD PoDGp5wXAIFxFvti/4LDATQ/Kivv/2Duq0JPHVlwsmBBKqRGAat58SEuxk9UIVEpBk bIakM4WPxvIvsvMEmUhPjGWsbvzOTNYRirp/kSli0w8iceyFrX8oLZuLO1zh++EV8J oWNqq2ZT2RqAQ== Original-Received: from pastel (unknown [104.247.241.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 92628120E7F; Sun, 20 Nov 2022 15:04:04 -0500 (EST) In-Reply-To: <86h6ytsb07.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 20 Nov 2022 21:04:40 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300269 Archived-At: >>> * 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