]> git.eshelyaron.com Git - emacs.git/commitdiff
Add commentary for subtle aspect of frame.el
authorEli Zaretskii <eliz@gnu.org>
Fri, 1 Jun 2018 12:34:30 +0000 (15:34 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 1 Jun 2018 12:34:30 +0000 (15:34 +0300)
* lisp/frame.el: Explain why we use symbol-function when adding
watchers for certain variables that need to trigger redisplay.

lisp/frame.el

index 447413b325612e6fa0328f804f29c12ade31d0ff..29c31f41cb11cb63652b174ce1c71d2751ee2bf4 100644 (file)
@@ -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