GNU bug report logs -
#45693
28.0.50; abbrev does not expand two words any more
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>>> "RP" == Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Wed, 13 Jan 2021 14:18:37 +0100, Uwe Brauer <oub <at> mat.ucm.es> said:
>>> Uwe Brauer <oub <at> mat.ucm.es> writes:
>>> Based on the code above, there is no list: youʼre unconditionally
>>> setting local-abbrev-table to a single table. You'd want something
>>> like:
>>> (define-minor-mode american-minor-mode
>>> nil nil nil nil
>>> (setq local-abbrev-table
>>> (if american-minor-mode
>>> (list american-minor-mode-abbrev-table local-abbrev-table))))
Uwe> Ok I did not think that through, you were referring to
Uwe> (setq local-abbrev-table (list my-abbrev-table fundamental-mode-abbrev-table))
Uwe> And the question is what comes first in that list, right?
Uwe> You asked whether to take the first or all elements of the list, would
Uwe> it be very resource consuming to take all?
> Not really, but people might find it confusing when 'add a local
> abbrev' results in modifying more than one abbrev table.
Ok, then the following question supposed I have executed
(setq local-abbrev-table (list my-abbrev-table fundamental-mode-abbrev-table))
I want to add
1. A simple word abbrev as in nacion to nación
2. I want to add a two word abbrev as in
a que --> a qué
For the latter I would use registers and something like this
(defun ediff-copy-to-register-A ()
(interactive)
(copy-to-register ?A (region-beginning) (region-end) nil)
(message "diff is copied to register A"))
(defun ediff-copy-to-register-B ()
(interactive)
(copy-to-register ?B (region-beginning) (region-end) nil)
(message "diff is copied to register B"))
(defun ediff-define-abbrev ()
(interactive)
(let ((name (get-register ?A)))
(let ((expansion (get-register ?B)))
(set-text-properties 0 (length name) nil name)
(define-abbrev local-abbrev-table name (downcase expansion))))
(message "abbrev is added using register A and B."))
Now should the first abbrev land in the fundamental local abbrev list
and the two word abbrev in my-abbrev-table?
Or shall I create another minor mode that I associate with the my-abbrev-table?
[smime.p7s (application/pkcs7-signature, attachment)]
This bug report was last modified 4 years and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.