From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: add-variable-watcher usage in lisp/frame.el Date: Fri, 1 Jun 2018 05:55:46 -0400 Message-ID: References: <87woviuaov.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527846829 15811 195.159.176.226 (1 Jun 2018 09:53:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 09:53:49 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 01 11:53:45 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOgki-00040X-0y for ged-emacs-devel@m.gmane.org; Fri, 01 Jun 2018 11:53:44 +0200 Original-Received: from localhost ([::1]:54542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOgmp-0003tH-2m for ged-emacs-devel@m.gmane.org; Fri, 01 Jun 2018 05:55:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOgmj-0003tB-22 for emacs-devel@gnu.org; Fri, 01 Jun 2018 05:55:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOgmi-0005S3-A6 for emacs-devel@gnu.org; Fri, 01 Jun 2018 05:55:49 -0400 Original-Received: from mail-ot0-x232.google.com ([2607:f8b0:4003:c0f::232]:45634) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOgmi-0005Rg-4I for emacs-devel@gnu.org; Fri, 01 Jun 2018 05:55:48 -0400 Original-Received: by mail-ot0-x232.google.com with SMTP id 15-v6so28596164otn.12 for ; Fri, 01 Jun 2018 02:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=Yx1slVsGPzYfjs5IzTEN4ISXB9y5m1F3h7fVGytLW14=; b=IptiS+txJnp4k+WwXYsbahqQG1Pokj/grpQtcgNsGQGwlPjrTGyJiWPPGuhE9X9/Dv 2TZGtTjNEaZGbRUwtY9ypLOSdig907t3wFlVf2CxekkTBGfRj3yeLnbDrJmyTIPWPmWv JuI0lcc4J2GCtZgIWuoU5eiZqysnfDwcfaCO1MemtFHjr5csNVHISPKPiBFg+6pmSBei 45xG9zxpV9efcs1EvCU1tDwKx9yfVXUVRKDkb3wuXLN11ex48WJFh7QJ/FnfcZRIal2U nibepNpPyih05IWY2FGz2Z1Vc4Mhl0Krl6uy7ROVoj/I1DJSHzQQ4ciCGiuX5O2e4I8B rhUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=Yx1slVsGPzYfjs5IzTEN4ISXB9y5m1F3h7fVGytLW14=; b=h96gr/OrwNAq6KcxUSCCZOJtbzH2hUyYdofPIB20zxMSK7QGXbl5DSpZTnD+3Dpf+t 0ZTKhXGEUh2guAF1NsynzWa5AZjQdmL58NeBfQMB2qHk54DVUTFvlID0M2jEA2SmELiK jYUn/ZHlSIdqb+0VUwsBBzlt6rDMPLY6Hc/Hq3GnHN/rLhESw/jMPbm32CUIcWEwd2ZW 2f3erChPYUXrCpZ5V/Pj3br6c27zdhj/CSLSm61hne7b2LkOXO/lQJ3uqtVW5MNdzePh D6ZM24X2fUefwEHr6lXhDFXps1St2EpyJdj+XESTS0jO6bLEirAGA1Omye25zcZJyJJp HeLw== X-Gm-Message-State: APt69E3gI62xa89K2X1wS5s1Kq0+81C57W2MIm7ZSPB1YfeL6PQ+2+RC 68kzxAgXmOR8DA4wJv/jKIFRcrtaG5loEdF+yBO8MQ== X-Google-Smtp-Source: ADUXVKIVuhp0V0A06P70KkRvGjPpbtiNumC3jCG3SWd+GlUMdrymSaNatPdJ+vNXMrASz7LXmGvi/+1X4ULSWHgSe6Y= X-Received: by 2002:a9d:e57:: with SMTP id n23-v6mr6297736otd.239.1527846947131; Fri, 01 Jun 2018 02:55:47 -0700 (PDT) Original-Received: by 2002:a4a:3b84:0:0:0:0:0 with HTTP; Fri, 1 Jun 2018 02:55:46 -0700 (PDT) In-Reply-To: <87woviuaov.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:225887 Archived-At: On 1 June 2018 at 05:18, Robert Pluim wrote: > lisp/frame.el has: > > (mapc (lambda (var) > (add-variable-watcher var (symbol-function 'set-buffer-redisplay)= )) > Not using symbol-function makes this output (set-buffer-redisplay) > instead, which I think looks better, I=CA=BCm wondering why symbol-functi= on > was used? Passing a subr object tells the variable watcher mechanism to call the C function directly (without a possible GC call), which is closer to what happened in Emacs 25 (see diff of [1: d3faef9bae]). I don't know that it's really needed in this case though. [1: d3faef9bae]: 2016-12-02 20:25:15 -0500 Ensure redisplay using variable watcher https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3Dd3faef9baedadc9e= aec46814ba9bbe5168048328