From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16411: undo-only bugs Date: Thu, 19 Jun 2014 17:35:13 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1403213794 4676 80.91.229.3 (19 Jun 2014 21:36:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Jun 2014 21:36:34 +0000 (UTC) Cc: 16411 <16411@debbugs.gnu.org> To: Barry OReilly Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 19 23:36:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wxk0K-0004Ae-BJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jun 2014 23:36:20 +0200 Original-Received: from localhost ([::1]:38076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxk0J-0001bX-W4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jun 2014 17:36:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxk0A-0001Y2-6q for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2014 17:36:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxk02-0005BU-MM for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2014 17:36:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxk02-0005BO-K0 for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2014 17:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wxk02-000309-5w for bug-gnu-emacs@gnu.org; Thu, 19 Jun 2014 17:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jun 2014 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16411 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16411-submit@debbugs.gnu.org id=B16411.140321372311479 (code B ref 16411); Thu, 19 Jun 2014 21:36:02 +0000 Original-Received: (at 16411) by debbugs.gnu.org; 19 Jun 2014 21:35:23 +0000 Original-Received: from localhost ([127.0.0.1]:53520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxjzO-0002z3-GI for submit@debbugs.gnu.org; Thu, 19 Jun 2014 17:35:22 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:11755) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WxjzL-0002yo-IJ for 16411@debbugs.gnu.org; Thu, 19 Jun 2014 17:35:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQSFBgNJIgM0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQSFBgNJIgM0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="68435554" Original-Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Jun 2014 17:35:13 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 90C3760D16; Thu, 19 Jun 2014 17:35:13 -0400 (EDT) In-Reply-To: (Barry OReilly's message of "Wed, 28 May 2014 14:42:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90570 Archived-At: > + "The pending undo elements in a run of consecutive undo commands. > +Specifically, this is a list of assocations of the > +form (ADJUSTED-ELT . ORIG-UNDO-LIST). ADJUSTED-ELT is an undo [...] > - (let ((equiv (gethash pending-undo-list undo-equiv-table))) > + ;; Check to see whether we're hitting a redo record > + (let ((equiv (gethash (cdr-safe pending-undo-list) undo-equiv-table))) Why take the cdr of pending-undo-list? IOW why skip the first element? Oh, and please punctuate your comments. > - (setq pending-undo-list equiv))) > + (setq pending-undo-list (cons (car equiv) equiv)))) I guess this brings the same question as above. > + (let ((list buffer-undo-list) > + (new-equiv (cdr-safe pending-undo-list))) And same here. > + (when (undo-primitive-elt elt) > + ;; Map the new undo element to what it undid. Not aware > + ;; yet of cases where we want to map all new elements. > + (puthash buffer-undo-list orig-tail undo-redo-table)) We should only do that in those cases where undo-equiv-table can't be used. Also, why did you have to move the valid-marker-adjustments thingy out of undo-primitive-elt? Stefan