emacs-devel
[Top][All Lists]
Advanced

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

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


From: Robert Pluim
Subject: Re: add-variable-watcher usage in lisp/frame.el
Date: Fri, 01 Jun 2018 12:31:22 +0200

Noam Postavsky <address@hidden> writes:

> 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.

Thanks for the explanation. By all means lets avoid adding potential GC to code
thatʼs not expecting it.

Robert



reply via email to

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