From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master b88e7c8: Make transpose-regions interactive (Bug#30343) Date: Sun, 25 Mar 2018 22:29:29 +0200 Message-ID: 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> <83605kgo1w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522009691 2866 195.159.176.226 (25 Mar 2018 20:28:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2018 20:28:11 +0000 (UTC) Cc: kfogel@red-bean.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 25 22:28:07 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 1f0CFK-0000dA-Jp for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2018 22:28:07 +0200 Original-Received: from localhost ([::1]:52468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0CHN-0006BU-T1 for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2018 16:30:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0CGn-0006Ap-0a for emacs-devel@gnu.org; Sun, 25 Mar 2018 16:29:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0CGj-0006Y0-RY for emacs-devel@gnu.org; Sun, 25 Mar 2018 16:29:37 -0400 Original-Received: from [2a03:2040:2:1b::1] (port=50567 helo=sinyavsky.aurox.ch) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f0CGj-0006XW-Fu for emacs-devel@gnu.org; Sun, 25 Mar 2018 16:29:33 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id EA2A7226E9 for ; Sun, 25 Mar 2018 20:30:26 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:mime-version :references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1522009825; x=1522873826; bh=YASPOURyI2L+7 uzyV9eCpw4q9/qtCi0rBRiXZLlOga4=; b=qtvwGXUPdzvENmdHF+2radyOa8wCP NJ1b2w6Z2iuMn3G9yri4V2y00YPWe8VGytcWUGj8Jl5a3XM4OvUFep19jIraBX1o v4Wed1Tg1QyKU3eAQRvoFWpYS4v8A9pItdRPST+F5zpP89NLYv00F0LCCamHPUz3 Qw9l5S9q5DDP48= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Re1z-zkDmz81 for ; Sun, 25 Mar 2018 20:30:25 +0000 (UTC) Original-Received: from gray (202.100.1.85.dynamic.wline.res.cust.swisscom.ch [85.1.100.202]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 9CDA1226BC; Sun, 25 Mar 2018 20:30:25 +0000 (UTC) In-reply-to: <83605kgo1w.fsf@gnu.org> (message from Eli Zaretskii on Sun, 25 Mar 2018 18:41:47 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a03:2040:2:1b::1 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:224019 Archived-At: > Date: Sun, 25 Mar 2018 18:41:47 +0300 > From: Eli Zaretskii > > > > . having it in C doesn't make hacking harder because one can alwa= ys > > > override functions in Emacs,=20 > >=20 > > Good point. Is this written in the Elisp manual anywhere? >=20 > Yes, it's documented where we describe 'defun': >=20 > Be careful not to redefine existing functions unintentionally. > =E2=80=98defun=E2=80=99 redefines even primitive functions such as= =E2=80=98car=E2=80=99 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. Thanks, this seems correct. =20 > > I searched for "override functions" and "override primitives" in the > > index, but did not find a result. >=20 > I would index this as "redefining functions", at least in addition to > "overriding", if not instead of it. I think both are good, although an index entry for "overriding functions" could also point to the "advice" documentation, since "overriding" is a less precise term than "redefining". =20 > > 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 preloade= d > > function named "read-two-regions" in simple.el. That would allow its > > reuse by other commands, too. >=20 > Where would such a function be useful? Nothing specific comes to mind. There is one pair of commands that already reads multiple regions: ediff-regions-linewise and -wordwise, so it's not unlikely that there could be other applications.