GNU bug report logs - #16411
undo-only bugs

Previous Next

Package: emacs;

Reported by: Barry OReilly <gundaetiapo <at> gmail.com>

Date: Fri, 10 Jan 2014 22:34:02 UTC

Severity: normal

Full log


Message #83 received at 16411 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Barry OReilly <gundaetiapo <at> gmail.com>
Cc: 16411 <16411 <at> debbugs.gnu.org>
Subject: Re: undo-only bugs
Date: Thu, 19 Jun 2014 17:35:13 -0400
> +  "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




This bug report was last modified 10 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.