From d7a580c7eb189c0b0daf131f9a1f3c8c7fe5f196 Mon Sep 17 00:00:00 2001
From: Lars Ingebrigtsen <larsi@gnus.org>
Date: Wed, 25 Nov 2020 06:29:10 +0100
Subject: [PATCH] Move code in face-remap.el to avoid a compilation warning
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

* 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 9f9dddfe68e..4ccd463aff2 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
-- 
2.39.5