From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Calling Lisp from undo.c's record_* functions Date: Thu, 19 Nov 2015 19:58:26 +0200 Message-ID: <838u5t98hp.fsf@gnu.org> References: <83r3jpc2of.fsf@gnu.org> <87h9kkbz6k.fsf@russet.org.uk> <838u5wbmvu.fsf@gnu.org> <83ziyc9zs0.fsf@gnu.org> <83wptg9dcd.fsf@gnu.org> <87610zsd3u.fsf@russet.org.uk> <83io4z9ozx.fsf@gnu.org> <87wpte8fas.fsf@russet.org.uk> <83poz67zpd.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1447955944 29683 80.91.229.3 (19 Nov 2015 17:59:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2015 17:59:04 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, phillip.lord@russet.org.uk To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 18:58:55 2015 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 1ZzTTx-0001Y7-L1 for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2015 18:58:53 +0100 Original-Received: from localhost ([::1]:43279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzTTw-00045f-SC for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2015 12:58:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzTTt-00045L-9J for emacs-devel@gnu.org; Thu, 19 Nov 2015 12:58:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzTTo-0005v8-Ci for emacs-devel@gnu.org; Thu, 19 Nov 2015 12:58:49 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:53621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzTTo-0005uB-4n; Thu, 19 Nov 2015 12:58:44 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NY200D00PT8FN00@mtaout25.012.net.il>; Thu, 19 Nov 2015 19:56:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NY2006MVPTI3860@mtaout25.012.net.il>; Thu, 19 Nov 2015 19:56:06 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 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:194810 Archived-At: > From: Stefan Monnier > Cc: phillip.lord@russet.org.uk (Phillip Lord), Richard Stallman , > emacs-devel@gnu.org > Date: Thu, 19 Nov 2015 12:49:57 -0500 > > > prepare_to_modify_buffer. This seems to avoid calling Lisp while the > > gap is being manipulated, but my question is: are there any pitfalls > > to calling Lisp code on the level of insdel.c functions? I'd like to > > hear your opinion before we decide whether to install the proposed > > solution, or look for a safer one. > > As mentioned earlier, this function has been running Elisp code forever > already via the before-change-functions hook. That is true, but unlike before-change-functions, which is not always non-nil, the undo-related call will always be run. So if calling Lisp there could cause some problems, those problems will become much more frequent now. > So we don't really have a choice here. There's always a choice.