From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Distinguish between regional undo and undo to the beginning in undo-equiv-table Date: Sat, 6 Mar 2021 12:28:53 -0500 Message-ID: <20C721E0-BC98-4D82-BD73-BA8BD6398058@gmail.com> References: <195AF8D0-1BFD-419D-88A1-69EA1FEED4D6@gmail.com> <60DCC8C7-CCA4-4113-88BE-B81A395C494D@gmail.com> <4890CDDF-E0DD-464B-9268-AD404015129D@gmail.com> <06A32454-8DB2-492C-9A69-A825AD5B66A2@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39425"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 06 18:29:56 2021 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 1lIakV-000A9i-H0 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Mar 2021 18:29:55 +0100 Original-Received: from localhost ([::1]:45286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIakU-00044l-Ho for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Mar 2021 12:29:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIajZ-00039u-K1 for emacs-devel@gnu.org; Sat, 06 Mar 2021 12:28:57 -0500 Original-Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:44790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lIajY-0007pY-2n for emacs-devel@gnu.org; Sat, 06 Mar 2021 12:28:57 -0500 Original-Received: by mail-qv1-xf35.google.com with SMTP id cw15so2597514qvb.11 for ; Sat, 06 Mar 2021 09:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QTfpUhbVnvkfkvrEhequJ9H9F7+OV+PCAd2zkBmVSmE=; b=oyMT9F1T3XLaTuqQCTMVRcD4IvjJzIC093H14ncD6y7/m4LRDRegJ34DuKwCUlWpSm hkzqhcgSUSMbC7W+x5mDY1GrGsmwYmtMVaMX/r4bjdxdPnQvx9h21zb1Azt4EAzS9oWz jGjfVo1ho3j0RrV9qFRBGG/4qOtphi/vCREeZj+BF7jzJVBcobo2qOWPpcwJsXpA8TBp RDjt+9qm7RsxHWbuQwK2suWU+2xMLISacJtOG3L75TCdLnVqv8KoL2Sa1RSpnkxPE49P xTKwGUSR7ZZ/WtLv/DMtx6keflhRgPU25pIqANq5T+4h3vggDj90sliD42E3qRrd5fNM NQDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QTfpUhbVnvkfkvrEhequJ9H9F7+OV+PCAd2zkBmVSmE=; b=SveYXVWKHjzQ5dhpPCoT9YfJc51DcIfqqaBYpnoSAOMfpJDQjIn2ffxgPaA8emUv2S YdtfO1IUyyDGcaYabicCjQXnAAdc9QMi8xF/e0cQSryx+/FV7QG2hdf+21zdwfDCkhsE XtqNSAtTZXMA4mejqFta7opielZ+EcQRZihqL2ReWLcRdmjTmnvruC2YCR6i1zhxs6we D2eUYOWCI/3KLJQHZc95bNOHdwUIZytc0sjMmD6qEQ0xksTSM7/TURcKszSlc4w+a5Ms ztVDg+m0C4eAG2A5zEh/tErKF6hXzIReW43ldE8saLoJ2BsiuEDWQ8W7n36ej8jpggRf aMZA== X-Gm-Message-State: AOAM533b2LhY/SH79OpMEJ8QqAgMWHqH/USpsD3oj9FPEREANpZvbIdC Hq0cSLf0bk9VY9qa1leiGjmCVhuJAs8= X-Google-Smtp-Source: ABdhPJwX9xbCAedZO0kzpuazEm52FP+YB+pMfApmOAGf77yx8RzDsv58rqBJ4sj8PtWKS0cwVBkVSw== X-Received: by 2002:a0c:b71a:: with SMTP id t26mr14449104qvd.38.1615051734590; Sat, 06 Mar 2021 09:28:54 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4102:3d80:dc3c:a170:9124:5745? ([2601:98a:4102:3d80:dc3c:a170:9124:5745]) by smtp.gmail.com with ESMTPSA id s126sm4155047qkf.62.2021.03.06.09.28.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Mar 2021 09:28:54 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::f35; envelope-from=casouri@gmail.com; helo=mail-qv1-xf35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:266089 Archived-At: > On Mar 5, 2021, at 10:57 AM, Stefan Monnier = wrote: >=20 >>>> Then should we add a mapping for the buffer-undo-list to t at that >>>> point? Or should we just do nothing? >>> Good question. I think you have a better understanding of how the = equiv >>> table should be filled than I do at this point, so I'd trust your = judgment. >> Ok, I looked into it in detail, undo-equiv-table is also used to = check if >> the previous command is really an undo, alongside with checking >> last-command. >=20 > Indeed [ tho, this test is not 100% reliable, because the hash-table = is > weak, so entries may disappear from it, leading to entries that used = to > map to non-nil suddenly mapping to nil. ] I think that=E2=80=99s fine. If the entry disappeared, that means either = the key or the value is no longer in the undo list, no? Yuan=