GNU bug report logs - #45693
28.0.50; abbrev does not expand two words any more

Previous Next

Package: emacs;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Wed, 6 Jan 2021 15:56:02 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #68 received at 45693 <at> debbugs.gnu.org (full text, mbox):

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: larsi <at> gnus.org, 45693 <at> debbugs.gnu.org
Subject: Re: bug#45693: [two word expansion works, but write-abbrev-file
 destroys it]
Date: Wed, 13 Jan 2021 10:28:03 +0100
[Message part 1 (text/plain, inline)]
> Uwe Brauer <oub <at> mat.ucm.es> writes:

> Yes, perfect, thanks. inverse-add-mode-abbrev tries to add the abbrev
> to 'local-abbrev-table', which is a list here:

> Debugger entered--Lisp error: (wrong-type-argument vectorp ([## 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a\ que 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] [## 0 0 0 0 0 0 asi 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]))
>   intern-soft("" ([## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a\ que 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] [## 0 0 0 0
> 0 0 asi 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 ...]))
>   obarray-get(([## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a\ que 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] [## 0 0 0 0 0
> 0 asi 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 ...]) "")
>   abbrev-table-get(([## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a\ que 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] [## 0 0 0
> 0 0 0 asi 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 ...]) :abbrev-table-modiff)
>   define-abbrev(([## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a\ que 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] [## 0 0 0 0
> 0 0 asi 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 ...]) "nacion" "the nation")
>   inverse-add-abbrev(([## 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a\ que 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...] [## 0 0
> 0 0 0 0 asi 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 ...]) "Mode" 1)
>   inverse-add-mode-abbrev(1)
>   funcall-interactively(inverse-add-mode-abbrev 1)
>   call-interactively(inverse-add-mode-abbrev nil nil)
>   command-execute(inverse-add-mode-abbrev)

> So itʼs explicitly documented that 'local-abbrev-table' can be a
> *list* of abbrev tables, but lots of the abbrev code assumes that
> it gets passed a single table.

> Itʼs easy enough to check for 'consp' in such cases, but then which of
> tables in that list should we add the abbrev to? The first one? All of
> them?

> Iʼm leaning towards "first, and document that you should put the most
> specific table at the front of the list of local abbrev tables", but
> Iʼd welcome opinions from others.

I am not entirely sure, I understand the logic behind this. To give you
a concrete example. (That enters now the flyspell problem).

I have defined for each language I use flypsell/ispell a minor mode and
a corresponding local-abbrev table.

    1. American

    2. British

    3. German

    4. Spanish

    5. French

    6. And even Hebrew (but we can leave that may out for the moment).

Now say I am in latex mode and turn spelling for American on (which in
turn turn the minor mode american-spelling on), is then the local abbrev
table the first in that list?


Uwe 
[smime.p7s (application/pkcs7-signature, attachment)]

This bug report was last modified 4 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.