Subject: Re: bug#55946: 29.0.50; minibuffer-mode lacks an abbrev table

From: Sean Whitton <[email-masked]>
Date: Mon, 13 Jun 2022 17:27:45 -0500

Hello,

On Mon 13 Jun 2022 at 05:26PM -04, Stefan Monnier wrote:

>>> >> I'd like to define an abbrev for minibuffer-mode but it doesn't have an
>>> >> abbrev table.  There's a comment in minibuffer.el saying that this is
>>> >> because abbrev.el is not loaded early enough.
>>> >
>>> > AFAICT, we only invoke this mode from C if it is fboundp.  So maybe
>>> > try changing that, and see if both a bootstrap and a simple build run
>>> > to completion OK.
>>>
>>> Thanks.  I see what you mean.  Tested both of those and it works.  Shall
>>> I push to master so it can receive wider testing?
>>
>> Let's see what Stefan thinks about this.
>> Stefan, any comments?
>
> I couldn't find the corresponding patch, so I don't know what to say.

Just the attached simple change.

> The comment only refers to defining an abbrev table while loading
> `minibuffer.el` because `minibuffer.el` was loaded by `abbrev.el`.
> But AFAICT nowadays `abbrev.el` is loaded before `minibuffer.el`, so the
> problem seems to have disappeared.

Cool.

-- 
Sean Whitton
>From 791f4991873d4eba25ae608bedb67190f347074f Mon Sep 17 00:00:00 2001
From: Sean Whitton <[email-masked]>
Date: Mon, 13 Jun 2022 12:24:17 -0500
Subject: [PATCH] Add abbrev tables for minibuffer-mode and
 minibuffer-inactive-mode

* lisp/minibuffer.el (minibuffer-mode, minibuffer-inactive-mode): Add
an abbrev table for each of these modes (bug#55946).
---
 lisp/minibuffer.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index bf89874ecc..2fd4902ef2 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2837,7 +2837,6 @@ minibuffer-inactive-mode-map
   "<down-mouse-1>" #'ignore)
 
 (define-derived-mode minibuffer-inactive-mode nil "InactiveMinibuffer"
-  :abbrev-table nil          ;abbrev.el is not loaded yet during dump.
   ;; Note: this major mode is called from minibuf.c.
   "Major mode to use in the minibuffer when it is not active.
 This is only used when the minibuffer area has no active minibuffer.
@@ -2859,7 +2858,6 @@ minibuffer-mode
 `minibuffer-setup-hook' and `minibuffer-exit-hook' rather than
 the mode hook of this mode."
   :syntax-table nil
-  :abbrev-table nil
   :interactive nil)
 
 ;;; Completion tables.
-- 
2.30.2