Subject: Re: bug#51056: 29.0.50; Making `gnus-define-keys' obsolete

From: Stefan Kangas <[email-masked]>
Date: Mon, 11 Oct 2021 12:46:41 -0700

Bill Wohler <[email-masked]> writes:

> Thanks so much for the MH-E clean-ups! They are very much appreciated.
> So far, I haven't noticed any issues with your updates.

Thank you, that is an encouraging report.

If we do break something, we can always back those commits out for
further investigation, as I already had to do in one case.  The culprit
was this change, but I can't say that I understand why:

diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index 805408cfc7..7cc0a1e83c 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -27,8 +27,7 @@
 ;;; Code:

 (require 'mh-e)
-(mh-do-in-gnu-emacs
-  (require 'tool-bar))
+(require 'tool-bar)

 ;;; Tool Bar Commands

So this innocent looking change leads to this:

In mh-tool-bar-define:
mh-e/mh-tool-bar.el:180:62: Warning: reference to free variable ‘folder-docs’
mh-e/mh-tool-bar.el:222:36: Warning: reference to free variable
    ‘folder-button-setter’
mh-e/mh-tool-bar.el:226:36: Warning: reference to free variable
    ‘sequence-button-setter’
mh-e/mh-tool-bar.el:191:34: Warning: reference to free variable ‘show-buttons’
mh-e/mh-tool-bar.el:230:36: Warning: reference to free variable
    ‘show-button-setter’
mh-e/mh-tool-bar.el:234:36: Warning: reference to free variable
    ‘show-seq-button-setter’
mh-e/mh-tool-bar.el:295:41: Warning: reference to free variable
    ‘letter-buttons’
mh-e/mh-tool-bar.el:296:41: Warning: reference to free variable ‘letter-docs’
mh-e/mh-tool-bar.el:245:36: Warning: reference to free variable
    ‘letter-button-setter’
mh-e/mh-tool-bar.el:280:51: Warning: reference to free variable
    ‘folder-defaults’
mh-e/mh-tool-bar.el:291:51: Warning: reference to free variable
    ‘letter-defaults’
mh-e/mh-tool-bar.el:194:36: Warning: reference to free variable
    ‘folder-vectors’
mh-e/mh-tool-bar.el:195:11: Warning: reference to free variable ‘show-vectors’
mh-e/mh-tool-bar.el:196:11: Warning: reference to free variable
    ‘letter-vectors’
mh-e/mh-tool-bar.el:197:14: Warning: assignment to free variable
    ‘folder-defaults’
mh-e/mh-tool-bar.el:199:61: Warning: assignment to free variable
    ‘letter-defaults’
mh-e/mh-tool-bar.el:189:11: Warning: reference to free variable
    ‘folder-buttons’
mh-e/mh-tool-bar.el:189:36: Warning: assignment to free variable
    ‘folder-buttons’
mh-e/mh-tool-bar.el:189:36: Warning: assignment to free variable
    ‘letter-buttons’
mh-e/mh-tool-bar.el:189:36: Warning: assignment to free variable
    ‘show-buttons’
mh-e/mh-tool-bar.el:189:36: Warning: assignment to free variable ‘letter-docs’
mh-e/mh-tool-bar.el:285:41: Warning: assignment to free variable ‘folder-docs’
mh-e/mh-tool-bar.el:285:41: Warning: assignment to free variable
    ‘folder-vectors’
mh-e/mh-tool-bar.el:285:41: Warning: assignment to free variable
    ‘show-vectors’
mh-e/mh-tool-bar.el:285:41: Warning: assignment to free variable
    ‘letter-vectors’
mh-e/mh-tool-bar.el:301:1: Error: Symbol’s value as variable is void:
folder-docs
  ELC      mh-e/mh-xface.elc
make[2]: *** [Makefile:316: mh-e/mh-tool-bar.elc] Error 1

Any ideas here are welcome.