summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2018-06-01 15:34:30 +0300
committerEli Zaretskii <eliz@gnu.org>2018-06-01 15:34:30 +0300
commite5471b2381e885d5d214bfa09ab0c35275fc6048 (patch)
tree7f7b32284052f74a3603a9f1516558741f1f29fc
parent61c8434fec7aa45b939137f8ab90c5d5b8cfa4b4 (diff)
downloademacs-e5471b2381e885d5d214bfa09ab0c35275fc6048.tar.gz
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.
-rw-r--r--lisp/frame.el3
1 files changed, 3 insertions, 0 deletions
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