From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Hansen Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: with-temp-buffer and undo Date: Fri, 12 May 2006 19:47:35 +0200 Message-ID: <4464CA37.3020208@soem.dk> References: <24090.1146238861@olgas.newt.com> <87slngh3wu.fsf@olgas.newt.com> <200605120450.k4C4ovkM019797@jane.dms.auburn.edu> <44643259.3050302@soem.dk> <4464686F.7050101@soem.dk> <87fyjftkim.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070303020208000202050401" X-Trace: sea.gmane.org 1147456088 8052 80.91.229.2 (12 May 2006 17:48:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 May 2006 17:48:08 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, wohler@newt.com, Luc Teirlinck , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 12 19:48:05 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Febk4-00031X-7e for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 19:47:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Febk2-000648-Vh for ged-emacs-devel@m.gmane.org; Fri, 12 May 2006 13:47:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Febjq-00063q-6v for emacs-devel@gnu.org; Fri, 12 May 2006 13:47:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Febjo-00063P-Dl for emacs-devel@gnu.org; Fri, 12 May 2006 13:47:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Febjo-00063M-7r; Fri, 12 May 2006 13:47:40 -0400 Original-Received: from [212.99.225.245] (helo=odin.broadcom.dk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FeblZ-0006z1-GW; Fri, 12 May 2006 13:49:29 -0400 Original-Received: from pppoe3-ves.broadcom.dk ([212.99.255.42] helo=[10.17.0.131]) by odin.broadcom.dk with esmtp (Exim 4.24; FreeBSD) id 1Febip-0001gV-LN; Fri, 12 May 2006 19:46:39 +0200 User-Agent: Debian Thunderbird 1.0.2 (X11/20060423) X-Accept-Language: en-us, en Original-To: Stefan Monnier In-Reply-To: <87fyjftkim.fsf-monnier+emacs@gnu.org> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54343 gmane.emacs.pretest.bugs:12014 Archived-At: This is a multi-part message in MIME format. --------------070303020208000202050401 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Stefan Monnier wrote: >>! `(let ((,temp-buffer (generate-new-buffer " *temp*")) >>! (buffer-undo-list t)) >> >> > >Buffer whose name start with a space have their undo disabled by default. >I.e. someone thought of that years ago already, > > Then my previous patch can be simplified. Any objections? --------------070303020208000202050401 Content-Type: text/x-patch; name="with-temp-file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="with-temp-file.diff" *** desktop.el.~1.99.~ 2006-02-19 15:43:52.000000000 +0100 --- desktop.el 2006-05-12 19:42:09.642918747 +0200 *************** *** 763,773 **** (setq locals (cdr locals))) ll))) (buffer-list))) ! (eager desktop-restore-eager) ! (buf (get-buffer-create "*desktop*"))) ! (set-buffer buf) ! (erase-buffer) ! (insert ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n" desktop-header --- 763,770 ---- (setq locals (cdr locals))) ll))) (buffer-list))) ! (eager desktop-restore-eager)) ! (with-temp-buffer (insert ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n" desktop-header *************** *** 801,807 **** info) (setq default-directory dirname) (let ((coding-system-for-write 'emacs-mule)) ! (write-region (point-min) (point-max) filename nil 'nomessage)))) (setq desktop-dirname dirname)) ;; ---------------------------------------------------------------------------- --- 798,804 ---- info) (setq default-directory dirname) (let ((coding-system-for-write 'emacs-mule)) ! (write-region (point-min) (point-max) filename nil 'nomessage))))) (setq desktop-dirname dirname)) ;; ---------------------------------------------------------------------------- --------------070303020208000202050401 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------070303020208000202050401--