[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] trunk r117384: Optionally, undo several consequential
Re: [Emacs-diffs] trunk r117384: Optionally, undo several consequential deletion in one step.
Mon, 23 Jun 2014 21:36:01 -0400
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)
Thanks for your patch. Some comments below.
> + "Whether appending to kill ring also makes \\[undo] restore both pieces of
> text simultaneously."
Please stick to a max of 80 columns, especially for docstrings.
> + (when (and kill-append-merge-undo (not buffer-read-only))
> + (let ((prev buffer-undo-list)
> + (next (cdr buffer-undo-list)))
> + ;; find the next undo boundary
Please capitalize and punctuate your comments.
> + (while (car next)
> + (pop next)
> + (pop prev))
> + ;; remove this undo boundary
> + (when prev
> + (setcdr prev (cdr next)))))))
I think this is a bit too aggressive. It should have an upper bound
(e.g. 20). It should only remove a boundary that's at the top of
buffer-undo-list. And it should make sure it only removes
Maybe one way to do that is to refactor the self-insert-command so as to
export the "undo-boundary-squasher" part.
- Re: [Emacs-diffs] trunk r117384: Optionally, undo several consequential deletion in one step.,
Stefan Monnier <=