[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16411: undo-only bugs
From: |
Stefan Monnier |
Subject: |
bug#16411: undo-only bugs |
Date: |
Thu, 19 Jun 2014 17:35:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> + "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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#16411: undo-only bugs,
Stefan Monnier <=