From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: add-variable-watcher usage in lisp/frame.el Date: Fri, 01 Jun 2018 12:31:22 +0200 Message-ID: <87o9guu7b9.fsf@gmail.com> 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 1527849020 7594 195.159.176.226 (1 Jun 2018 10:30:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 10:30:20 +0000 (UTC) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 01 12:30:16 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 1fOhK3-0001th-Vv for ged-emacs-devel@m.gmane.org; Fri, 01 Jun 2018 12:30:16 +0200 Original-Received: from localhost ([::1]:54652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOhMB-0006Jo-5C for ged-emacs-devel@m.gmane.org; Fri, 01 Jun 2018 06:32:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOhLG-0006JK-3A for emacs-devel@gnu.org; Fri, 01 Jun 2018 06:31:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOhLD-0007WN-DZ for emacs-devel@gnu.org; Fri, 01 Jun 2018 06:31:30 -0400 Original-Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]:36422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOhLD-0007W8-7e for emacs-devel@gnu.org; Fri, 01 Jun 2018 06:31:27 -0400 Original-Received: by mail-wr0-x234.google.com with SMTP id f16-v6so20523294wrm.3 for ; Fri, 01 Jun 2018 03:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=FYbSsBx+dTS+RrmpxTBNDWGBFfZ/8sp9YTgZ8zx8Sc8=; b=sd/f28D5OesejI3arEImsaSVmlb4moO1U02ijjn2aNK0KfKgGpV4zIOIeP+fBhJo/k 6IuyGsh34RSg02c14PAJMoiYlHe3C735dY6VO0NEcpzarP6BNuz7VfB7h/IvvbzHQ3f4 mXgArfxp1KLQAiIJzqjqSaKgA2dw+IQlU7KEqTqp0NRXZo1X9LKr5vEpu0pPdTwx/wFh 4NwvzyvwJCeWBq/aqP7kpglO7eUbm5tkgspjQ2jlZ4nDJebVaNrR6kxmwI1bkPhID/x6 r4KQANXtSkcur7DgsRG5h8wn10CS+vz51OJyXrr0j4HTyudqTW0xOwtJnJMhyf87oIpP yNGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=FYbSsBx+dTS+RrmpxTBNDWGBFfZ/8sp9YTgZ8zx8Sc8=; b=h2Pa3W9w0x8gsVD31wxtFNA37/XccKtCvUDAgw5A6kWURcVRKUfkxm1livH5LHWgZp +3ZW0WpeBDW1aSsKreXcj+hITXgNN72lNO3yI/wUfxo/yksHZuMszXJ858R4zDlVNTvN fj4EwrsU0pmw92VkkxTPlrLvgAJs9Iie+qfI5SvjLGR9LcF0hxuTcIsgSth6fufA1HsE CgI7f7Qjd29/nSLnQAXm4pC9nQgs3fvQu5mt428Zg7zAd6BSeABEs9+yqOBB3limlQbo xfCtfwSbfq5v9WolwUEcj8kw6OIHN49qBYQhFNFEhYyIPodFVatKp8Gou/DrePMD9XqA GkzA== X-Gm-Message-State: ALKqPwfwHwP01hWVf0B/B1FVFmcUUg83Z+0Q5cUcO5ny10Tl18xVUXEc zvHzJImyW+d0scRJZRkq//UcoEe0v2c= X-Google-Smtp-Source: ADUXVKIAIpRVS8VFgihuz7C8wcUVU5SeEiZsRzgPdCVwtJBz9cNf0mMVLKN6mI8JgJXfcZ7hJG2q2Q== X-Received: by 2002:adf:b11a:: with SMTP id l26-v6mr8558662wra.258.1527849085781; Fri, 01 Jun 2018 03:31:25 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id d7-v6sm20490536wrm.9.2018.06.01.03.31.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 03:31:24 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Noam Postavsky's message of "Fri, 1 Jun 2018 05:55:46 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::234 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:225889 Archived-At: Noam Postavsky writes: > 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-funct= ion >> 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. Thanks for the explanation. By all means lets avoid adding potential GC to = code that=CA=BCs not expecting it. Robert