all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 2 questions about undo-list
@ 2009-01-24 17:45 Andreas Politz
  2009-01-24 20:54 ` Peter Dyballa
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Politz @ 2009-01-24 17:45 UTC (permalink / raw)
  To: help-gnu-emacs


Hello !

1. I want to transparently remove whitespace
from the end of the lines before saving a buffer.
By `transparently' I mean without it disturbing
the undo mechanism.

I tried
(let (buffer-undo-list)
      (replace-regexp ...))

in a before-save-hook, but it _does_ mess up the
undo history. How should I do this ? (Too much to ask ?)

2. self-insert-commands enter the undo-list in packs a 20
chars or so (=> (info "(elisp)Undo") ). Is this kind of
grouping possible for other commands as well ? Kind of
like the opposite of undo-boundary.

Thanks,

-ap




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

* Re: 2 questions about undo-list
  2009-01-24 17:45 2 questions about undo-list Andreas Politz
@ 2009-01-24 20:54 ` Peter Dyballa
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Dyballa @ 2009-01-24 20:54 UTC (permalink / raw)
  To: Andreas Politz; +Cc: help-gnu-emacs


Am 24.01.2009 um 18:45 schrieb Andreas Politz:

> I tried
> (let (buffer-undo-list)
>      (replace-regexp ...))


How is delete-trailing-whitespace performing?

--
Mit friedvollen Grüßen

   Pete

Diese Nachricht wurde mit einer Taschenlampe ins offene Ende eines  
Glasfaserkabels gemorst.






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

end of thread, other threads:[~2009-01-24 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-24 17:45 2 questions about undo-list Andreas Politz
2009-01-24 20:54 ` Peter Dyballa

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.