From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master b88e7c8: Make transpose-regions interactive (Bug#30343) Date: Sun, 25 Mar 2018 18:41:47 +0300 Message-ID: <83605kgo1w.fsf@gnu.org> References: <20180311105533.30002.78782@vcs0.savannah.gnu.org> <20180311105534.3DAFD23CF3@vcs0.savannah.gnu.org> <83woyiscns.fsf@gnu.org> <87po44jb7w.fsf@red-bean.com> <20180311105533.30002.78782@vcs0.savannah.gnu.org> <20180311105534.3DAFD23CF3@vcs0.savannah.gnu.org> <83woyiscns.fsf@gnu.org> <87a7v2zb27.fsf@red-bean.com> <838tallwpg.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1521992444 11507 195.159.176.226 (25 Mar 2018 15:40:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2018 15:40:44 +0000 (UTC) Cc: kfogel@red-bean.com, emacs-devel@gnu.org To: charles@aurox.ch (Charles A. Roelli) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 25 17:40:39 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f07l9-0002sl-CT for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2018 17:40:39 +0200 Original-Received: from localhost ([::1]:51638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f07nA-00014S-K1 for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2018 11:42:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f07mC-00012B-Tw for emacs-devel@gnu.org; Sun, 25 Mar 2018 11:41:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f07m9-0004sy-0g for emacs-devel@gnu.org; Sun, 25 Mar 2018 11:41:44 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f07m8-0004so-TF; Sun, 25 Mar 2018 11:41:40 -0400 Original-Received: from [176.228.60.248] (port=1786 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f07m8-000642-9R; Sun, 25 Mar 2018 11:41:40 -0400 In-reply-to: (charles@aurox.ch) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224005 Archived-At: > Date: Sun, 25 Mar 2018 12:03:35 +0200 > From: charles@aurox.ch (Charles A. Roelli) > CC: kfogel@red-bean.com, emacs-devel@gnu.org > > > Date: Wed, 21 Mar 2018 09:22:19 +0200 > > From: Eli Zaretskii > > > > Here are some reasons why not to make the change: > > > > . there's nothing wrong with that code > > . having it in C doesn't make hacking harder because one can always > > override functions in Emacs, > > Good point. Is this written in the Elisp manual anywhere? Yes, it's documented where we describe 'defun': Be careful not to redefine existing functions unintentionally. ‘defun’ redefines even primitive functions such as ‘car’ without any hesitation or notification. Emacs does not prevent you from doing this, because redefining a function is sometimes done deliberately, and there is no way to distinguish deliberate redefinition from unintentional redefinition. > I searched for "override functions" and "override primitives" in the > index, but did not find a result. I would index this as "redefining functions", at least in addition to "overriding", if not instead of it. > Instead of defining transpose-regions (and its interactive spec) in > Lisp (as the reverted patch did), we could take the current > interactive spec of transpose-regions and use that to make a preloaded > function named "read-two-regions" in simple.el. That would allow its > reuse by other commands, too. Where would such a function be useful?