Subject: bug#41852: 27.0.50; text-scale commands don't scale header of tabulated-list-mode

From: Stefan Kangas <[email-masked]>
Date: Mon, 19 Oct 2020 15:41:48 -0700

Eli Zaretskii <[email-masked]> writes:

> Can we continue supporting text-scale-mode-remapping in
> text-scale-mode--remappings?  I'd like to avoid backward-incompatible
> changes if possible.

Do you mean something like this?

diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 4d7be7d65a..377976782f 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -219,7 +219,8 @@ text-scale-mode-step

 ;; current remapping cookie for text-scale-mode
 (defvar text-scale-mode-remapping nil)
-(make-obsolete-variable 'text-scale-mode-remapping "no longer used." "28.1")
+(make-obsolete-variable 'text-scale-mode-remapping
+                        'text-scale-mode--remappings "28.1")

 (defvar text-scale-mode--remappings nil
   "List of current remapping cookies for `text-scale-mode'.")
@@ -239,8 +240,10 @@ text-scale-remap-header-line-face
 (make-variable-buffer-local 'text-scale-header-line)

 (defun face-remap--clear-remappings ()
-  (dolist (remapping text-scale-mode--remappings)
+  (dolist (remapping (cons text-scale-mode-remapping ; backwards-compatibility
+                           text-scale-mode--remappings))
     (face-remap-remove-relative remapping))
+  (setq text-scale-mode-remapping nil) ; backwards-compatibility
   (setq text-scale-mode--remappings nil))

 (defun face-remap--remap-face (sym)

> Do mouse clicks work well, even if you click close to the edges of a
> much-enlarged header-line?

This seems to work as expected, yes.  I've tested with both very large
and very small text sizes.

> Otherwise the changes look fine to me, thanks.

Thank you for reviewing.