I would like to define multiple abbrevs that expand to the same string. Currently, I have the following in my abbrevs file.

(define-abbrev-table 'global-abbrev-table
  '(("abbrev1" "Some long expansion." nil 0)
    ("abbrev2" "Some long expansion that is identical to the above." nil 0)

If I want to modify the expansion, I have to manually modify all the expansions. I tried the following as a workaround:

(setq expansion "The long expansion that I want to define multiple abbreviations for.")
(define-abbrev-table 'global-abbrev-table
  '(("abbrev1" expansion nil 0)
    ("abbrev2" expansion nil 0)

But this does not work. I'm probably missing something quite elementary, but is there some way to achieve the above? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.