Is there a way to get abbrev expansion on a lower case abbrev but not on its upper case version?

E.g.: I have "r" expanding to "are". I'd like "R" to stay "R".

I don't necessarily want to get rid of capitalization completely, so I'd still like "Btw" to expand to "By the way", but if there is no other option I'd take it.

1 Answer 1


Yes: just put a non-nil value for the :case-fixed property.

(define-abbrev my-foo-abbrev-table "r" "EmacsRocks" nil
               :case-fixed t)

See C-h v define-abbrev RET for more details.

  • Thanks! Even better, you can do it also in define-abbrev-table. The property has to go before the counter value. E.g.: ("r" "are" nil :case-fixed t 332)
    – user673592
    Commented Apr 6, 2016 at 7:34
  • Yes, it can be applied to the whole abbrev table, if you prefer. As for the position of the counter: not really! the counter value is just another property, so it should be ("r" "are" nil :case-fixed t :counter 332) but the ordering of the properties doesn't matter.
    – Stefan
    Commented Apr 6, 2016 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.