[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add-variable-watcher usage in lisp/frame.el

From: Noam Postavsky
Subject: Re: add-variable-watcher usage in lisp/frame.el
Date: Fri, 1 Jun 2018 05:55:46 -0400

On 1 June 2018 at 05:18, Robert Pluim <address@hidden> 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ʼm wondering why symbol-function
> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]