From e5471b2381e885d5d214bfa09ab0c35275fc6048 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Jun 2018 15:34:30 +0300 Subject: [PATCH] Add commentary for subtle aspect of frame.el * lisp/frame.el: Explain why we use symbol-function when adding watchers for certain variables that need to trigger redisplay. --- lisp/frame.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/frame.el b/lisp/frame.el index 447413b3256..29c31f41cb1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2475,6 +2475,9 @@ See also `toggle-frame-maximized'." ;; F5 then produces the correct effect, the variable doesn't need ;; to be in this list; otherwise, it does. (mapc (lambda (var) + ;; Using symbol-function here tells the watcher machinery to + ;; call the C function set-buffer-redisplay directly, thus + ;; avoiding a potential GC. (add-variable-watcher var (symbol-function 'set-buffer-redisplay))) '(line-spacing overline-margin -- 2.39.5