[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: abbrev_defs & capitalised words
From: |
Eli Zaretskii |
Subject: |
Re: abbrev_defs & capitalised words |
Date: |
Fri, 24 May 2019 15:31:36 +0300 |
> From: Sharon Kimble <boudiccas@skimble.plus.com>
> Cc: help-gnu-emacs@gnu.org
> Date: Fri, 24 May 2019 12:56:02 +0100
>
> > Did you read the doc string of 'define-abbrev'?
>
> I'm not sure what you mean, so I googled it, which led to [1], [2], and
> finally [3]. And I'm still not sure what you mean!
I meant what Emacs shows when you type "C-h f define-abbrev RET". It
says this:
(define-abbrev TABLE NAME EXPANSION &optional HOOK &rest PROPS)
Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
NAME must be a string, and should be lower-case.
EXPANSION should usually be a string.
[...]
PROPS is a property list. The following properties are special:
- ‘:count’: the value for the abbrev’s usage-count, which is incremented each
time the abbrev is used (the default is zero).
- ‘:system’: if non-nil, says that this is a "system" abbreviation
which should not be saved in the user’s abbreviation file.
Unless ‘:system’ is ‘force’, a system abbreviation will not
overwrite a non-system abbreviation of the same name.
- ‘:case-fixed’: non-nil means that abbreviations are looked up without
case-folding, and the expansion is not capitalized/upcased.
- ‘:enable-function’: a function of no argument which returns non-nil if the
abbrev should be used for a particular call of ‘expand-abbrev’.
Note the ‘:case-fixed’ part: isn't that what you want? If so, you
could modify your abbrev_defs file to make select abbrevs have fixed
letter-case.