emacs-diffs
[Top][All Lists]
Advanced

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

master d7a580c: Move code in face-remap.el to avoid a compilation warnin


From: Lars Ingebrigtsen
Subject: master d7a580c: Move code in face-remap.el to avoid a compilation warning
Date: Wed, 25 Nov 2020 00:29:19 -0500 (EST)

branch: master
commit d7a580c7eb189c0b0daf131f9a1f3c8c7fe5f196
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Move code in face-remap.el to avoid a compilation warning
    
    * lisp/face-remap.el (text-scale--refresh): Move code to avoid
    compilation warning.
    
    In text-scale--refresh:
    face-remap.el:241:14: Warning: reference to free variable ‘text-scale-mode’
---
 lisp/face-remap.el | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 9f9dddf..4ccd463 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -233,17 +233,6 @@ Each positive or negative step scales the default face 
height by this amount."
   "If non-nil, text scaling may change font size of header lines too.")
 (make-variable-buffer-local 'text-scale-header-line)
 
-(defun text-scale--refresh (symbol newval operation where)
-  "Watcher for `text-scale-remap-header-line'.
-See `add-variable-watcher'."
-  (when (and (eq symbol 'text-scale-remap-header-line)
-             (eq operation 'set)
-             text-scale-mode)
-    (with-current-buffer where
-      (let ((text-scale-remap-header-line newval))
-        (text-scale-mode 1)))))
-(add-variable-watcher 'text-scale-remap-header-line #'text-scale--refresh)
-
 (defun face-remap--clear-remappings ()
   (dolist (remapping
            ;; This is a bit messy to stay backwards compatible.
@@ -288,6 +277,17 @@ the font size of the header line."
       (face-remap--remap-face 'header-line)))
   (force-window-update (current-buffer)))
 
+(defun text-scale--refresh (symbol newval operation where)
+  "Watcher for `text-scale-remap-header-line'.
+See `add-variable-watcher'."
+  (when (and (eq symbol 'text-scale-remap-header-line)
+             (eq operation 'set)
+             text-scale-mode)
+    (with-current-buffer where
+      (let ((text-scale-remap-header-line newval))
+        (text-scale-mode 1)))))
+(add-variable-watcher 'text-scale-remap-header-line #'text-scale--refresh)
+
 (defun text-scale-min-amount ()
   "Return the minimum amount of text-scaling we allow."
   ;; When the resulting pixel-height of characters will become smaller



reply via email to

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