all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r117384: Optionally, undo several consequential deletion in one step.
       [not found] <E1WzAm8-00071N-SL@vcs.savannah.gnu.org>
@ 2014-06-24  1:36 ` Stefan Monnier
  2014-06-24  5:55   ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2014-06-24  1:36 UTC (permalink / raw)
  To: Sam Steingold; +Cc: emacs-devel

Hi Sam,

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
auto-added boundaries.

Maybe one way to do that is to refactor the self-insert-command so as to
export the "undo-boundary-squasher" part.


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] trunk r117384: Optionally, undo several consequential deletion in one step.
  2014-06-24  1:36 ` [Emacs-diffs] trunk r117384: Optionally, undo several consequential deletion in one step Stefan Monnier
@ 2014-06-24  5:55   ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2014-06-24  5:55 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Sam Steingold, emacs-devel


Also there should be a NEWS entry to let people know this feature exists.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-24  5:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1WzAm8-00071N-SL@vcs.savannah.gnu.org>
2014-06-24  1:36 ` [Emacs-diffs] trunk r117384: Optionally, undo several consequential deletion in one step Stefan Monnier
2014-06-24  5:55   ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.