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: Wed, 3 Mar 2021 17:08:04 -0500 Message-ID: References: <195AF8D0-1BFD-419D-88A1-69EA1FEED4D6@gmail.com> <60DCC8C7-CCA4-4113-88BE-B81A395C494D@gmail.com> <4890CDDF-E0DD-464B-9268-AD404015129D@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="24818"; 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 Wed Mar 03 23:12:06 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 1lHZiw-0006MR-H1 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Mar 2021 23:12:06 +0100 Original-Received: from localhost ([::1]:52752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHZiv-00064c-Dw for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Mar 2021 17:12:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHZf6-00008M-L0 for emacs-devel@gnu.org; Wed, 03 Mar 2021 17:08:08 -0500 Original-Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:37338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHZf5-0007gy-1K for emacs-devel@gnu.org; Wed, 03 Mar 2021 17:08:08 -0500 Original-Received: by mail-qk1-x72c.google.com with SMTP id s7so15670324qkg.4 for ; Wed, 03 Mar 2021 14:08:06 -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=PjjuTV5U14Ekuvr5Qv1x9bxbME0607Va7/8hcqFr6IE=; b=gzzXaR9dn4f6ibeyU54Orx8QF+oowkcU2ynKgGJaDXYxbKsXZ+Y3neX5CXUBXB/W5q NMn6Cpn9O2lN+7bcmsgkLpbZ7AdELhDN+P2OZBl2vm55+rljZuWoqppN6PBLiS7XfH8n DxFZFBAgSNDgIEvUGf8pb7oUp6klCoYErI1Iu4zMnzS7Xgl8ian8fXhBmh2gj4g0VJJP mI4geSb2LGgA2ZZQTN9+53ePp0wl9N1d/cr8iYepf3vona5Y7noEjUHsd//7ukZDNwD5 BlyQUwTSxW0UB73s+KvcnwWkpXoXHU8htWcRVsc2mIehNSI2INEeE5c6JgTlv5lAsmcW 09/g== 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=PjjuTV5U14Ekuvr5Qv1x9bxbME0607Va7/8hcqFr6IE=; b=suzQFGPfr0kqu7+++mCzriOJE0TJGdqF/7lE7wVk99/OBm9PqD6NDlGcau4KhG0NHm wLZtqyKqYGUwE1GDeWJS9H2oXPqiYqFf6chNZ8WOaPAezO/9a9dq04573U/Ysvrjz2oQ JJNXu2odp4WZSYOb2nR6GVfB+oTVdqJ13omt1LMtf4OGoMpKMU17dY4nZojR7kUjBpZA 0pRIfeQAMcbN16Zwy6z6syWVEvkYy86JgY/6Vy7FyUmCt/eC7NOgkJDGJoFFJ2axqaPN 6EDL85aneoaVMLJNJKPr5PpXWv6Dgz3vIlx1Hhvcv0DezX0BbaDYt7+D8pTGPsNnswcC S9JQ== X-Gm-Message-State: AOAM531cJ9Zn2orKA3c4QMAmwAoyChpQiGwmkCAjY0J4hcu7MLYCkyVA UoPH64iY1eoBv+ne+FoYmuY= X-Google-Smtp-Source: ABdhPJwrLaVeKaVZZykc05DiJfOcuGoLAZxiHIgRjuKm2MWhARtAcYGyicl+M6kdw+aJu/znDz80uw== X-Received: by 2002:a37:4747:: with SMTP id u68mr1168396qka.279.1614809286078; Wed, 03 Mar 2021 14:08:06 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4102:3d80:20f7:9d29:1f01:15b8? ([2601:98a:4102:3d80:20f7:9d29:1f01:15b8]) by smtp.gmail.com with ESMTPSA id t71sm18291634qka.86.2021.03.03.14.08.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 14:08:05 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::72c; envelope-from=casouri@gmail.com; helo=mail-qk1-x72c.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:265919 Archived-At: BTW, I can=E2=80=99t quite get what the comment at simple.el:2920 means: (puthash list ;; Prevent identity mapping. This can happen if ;; consecutive nils are erroneously in undo list. (if (or undo-in-region (eq list pending-undo-list)) t pending-undo-list) undo-equiv-table) Is it that if there is (nil nil nil) on the top of buffer-undo-list, the = middle one will be considered an undo record and will be passed to = primitive-undo? In that case nothing is done and nothing is added to = buffer-undo-list? Then should we add a mapping for the buffer-undo-list = to t at that point? Or should we just do nothing? Yuan=