From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [RFC, experimental] save_{excursion,restriction} Date: Wed, 25 Jul 2012 19:44:34 -0400 Message-ID: References: <500D84B6.50303@yandex.ru> <500E2FB7.4080006@yandex.ru> <500E86F8.7090102@yandex.ru> <500FBEB2.7050302@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343259882 15790 80.91.229.3 (25 Jul 2012 23:44:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2012 23:44:42 +0000 (UTC) Cc: Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 26 01:44:41 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SuBFx-00014u-Fi for ged-emacs-devel@m.gmane.org; Thu, 26 Jul 2012 01:44:41 +0200 Original-Received: from localhost ([::1]:57166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuBFw-0007w9-Ka for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2012 19:44:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuBFu-0007vz-EN for emacs-devel@gnu.org; Wed, 25 Jul 2012 19:44:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuBFt-00086h-Ii for emacs-devel@gnu.org; Wed, 25 Jul 2012 19:44:38 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:45646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuBFt-00086V-Eu for emacs-devel@gnu.org; Wed, 25 Jul 2012 19:44:37 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6PNiYvp032735; Wed, 25 Jul 2012 19:44:35 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 36A9EAECAF; Wed, 25 Jul 2012 19:44:34 -0400 (EDT) In-Reply-To: <500FBEB2.7050302@yandex.ru> (Dmitry Antipov's message of "Wed, 25 Jul 2012 13:38:58 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4290=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4290> : streams <790337> : uri <1174949> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151887 Archived-At: >> I think you'll be better off making it into a standard Lisp_Object such >> as pseudovector or a Lisp_Misc. The fact that they're only used on the >> specpdl and hence managed via xmalloc+xfree shouldn't make them >> that special. > OK. The only question is: should `excursion' field of struct buffer > be special, like `undo_list', or handled as usual? This patch assumes > first scenario, but it's not a problem to follow the second one. If the excursion is made into a Lisp_Object (as a pseudovector of lisp_misc), then you don't need to have an `excursions' field in `struct buffer', save_excursion_save can just return the excursion object (i.e. the PVEC_EXCURSION in your code). Stefan