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: Distinguish between regional undo and undo to the beginning in undo-equiv-table Date: Tue, 2 Mar 2021 15:40:47 -0500 Message-ID: <195AF8D0-1BFD-419D-88A1-69EA1FEED4D6@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27206"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 02 21:42:00 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 1lHBqB-0006w7-Vf for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 21:41:59 +0100 Original-Received: from localhost ([::1]:56652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHBqA-0008Va-MK for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 15:41:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHBp5-00080i-EZ for emacs-devel@gnu.org; Tue, 02 Mar 2021 15:40:51 -0500 Original-Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:35142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lHBp3-0006Ls-QE for emacs-devel@gnu.org; Tue, 02 Mar 2021 15:40:51 -0500 Original-Received: by mail-qk1-x733.google.com with SMTP id d20so20771017qkc.2 for ; Tue, 02 Mar 2021 12:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=/XcndX5px1vTTtTM1clrtc9wF0PjuIrXLeZIzl4cDZE=; b=No6AZ8qpWvOhEwSYB/HY94Acxrnf4eVr0cQttQ1n5hnbwG6JynTBrhLvb2QLEqNEX5 lCz8kOt4EcTzafcUd/VmfXgvG0LN0PzXKxpKxJf4C/3i25rPrs1Pieq3vnElsC596Fw2 V0iP4bUkHiA8dSE3pgULNGZ3eEC+Ypsx5noW9lfr2BNQf/Us1jT1gspBcXDjHIY3rzAd 5kicfeaO1BGFcnmnswaf9vOW+LPVhamb3F2+nMiGlWJY1J+/tOF7vZoO/TTbR/EMunWR xNRIOISaDVGBnKLkbLgyBAbos/8z4K3J+sJpfX0Q5NBItuItOOS4R5uyqnsHZ7i1g1SE zU0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=/XcndX5px1vTTtTM1clrtc9wF0PjuIrXLeZIzl4cDZE=; b=ZdfCMqiPVX3RtkIWjwQ34R8EEw9VxRfSoJ8QYs1vJHPDKTi+wJR8voqWixXnyKJUw+ hqe0bVPzmlNbnT7DWcoTgPDZK6mvQMpsXZlRVC+vg/fdCcIx9MR9IT6KybuqFzUpnXf8 p0kvySXWWtNIf+I64uU0Qjh4D8nC58/r8W08Ly4a7hGaZkwr1lhOY60YkK+sPZm+zdxF Ivh9nnlx0pYy6Xc7McYSen+SLtvfBM3sG1cq79te7IGIvV8Z+/XItiJkW1eASQPjiouV u7HH6B4U/jZz9kJv3fEIhCw9zceahkf64UW528ndNFGhyaFZuKRi/BC9qUL5hF/mUjVc xIpA== X-Gm-Message-State: AOAM532Xe4H4+3Xh40FU5oEgxTq49tL/eTFU9t9nzgq+qVliGYzWH62g 1sdOKGS6xEeVUw3CmotjqQOS1tnXSUc= X-Google-Smtp-Source: ABdhPJw4SvU3Z4h2oTPYfJtumTwnQIzCaaSKWYDfO5J2P5HoHivO12Ay1nTddxzJFIfIOBhllCeP9g== X-Received: by 2002:a37:a785:: with SMTP id q127mr1751022qke.425.1614717648577; Tue, 02 Mar 2021 12:40:48 -0800 (PST) Original-Received: from ?IPv6:2601:98a:4102:3d80:d5d8:c1e1:7c15:ceff? ([2601:98a:4102:3d80:d5d8:c1e1:7c15:ceff]) by smtp.gmail.com with ESMTPSA id d16sm15148888qka.43.2021.03.02.12.40.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Mar 2021 12:40:48 -0800 (PST) X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=casouri@gmail.com; helo=mail-qk1-x733.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:265846 Archived-At: Currently if I undo to the beginning of the pending-undo-list, = buffer-undo-list is mapped to t in undo-equiv-table. Meanwhile, if the = undo is undo-in-region, the buffer-undo-list is also mapped to t in = undo-equiv-table. That means my package that constructs an undo tree from buffer-undo-list = cannot distinguish the two and thus cannot work incorrectly. Is it ok to = map one type of undo to something other than t? Maybe a symbol = 'undo-in-region? Would that break anything? Or maybe we can create = another hash table to mark undo-in-region undos. I can explain how does my package use undo-equiv-table if needed. Yuan=