From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.help Subject: 2 questions about undo-list Date: Sat, 24 Jan 2009 18:45:22 +0100 Organization: FH-Trier Message-ID: <1232819186.176293@arno.fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232822450 11121 80.91.229.12 (24 Jan 2009 18:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2009 18:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 24 19:42:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LQnS6-0003B2-Vl for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Jan 2009 19:41:55 +0100 Original-Received: from localhost ([127.0.0.1]:35773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQnQp-0004Pl-BB for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Jan 2009 13:40:35 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!news-2.dfn.de!news.uni-stuttgart.de!news.belwue.de!news.uni-kl.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 143-93-54-11.arno.fh-trier.de Original-X-Trace: news.uni-kl.de 1232819252 17364 143.93.54.11 (24 Jan 2009 17:47:32 GMT) Original-X-Complaints-To: usenet@news.uni-kl.de Original-NNTP-Posting-Date: Sat, 24 Jan 2009 17:47:32 +0000 (UTC) User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) Cache-Post-Path: arno.fh-trier.de!unknown@dslb-088-069-052-190.pools.arcor-ip.net X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) Original-Xref: news.stanford.edu gnu.emacs.help:166288 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61611 Archived-At: 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