unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: abbrev_defs & capitalised words
Date: Fri, 24 May 2019 15:31:36 +0300	[thread overview]
Message-ID: <834l5k5907.fsf@gnu.org> (raw)
In-Reply-To: <871s0onk19.fsf@skimble.plus.com> (message from Sharon Kimble on Fri, 24 May 2019 12:56:02 +0100)

> 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.



      parent reply	other threads:[~2019-05-24 12:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24  7:41 abbrev_defs & capitalised words Sharon Kimble
2019-05-24  7:55 ` Eli Zaretskii
2019-05-24 11:56   ` Sharon Kimble
2019-05-24 12:20     ` tomas
2019-05-24 17:15       ` Sharon Kimble
2019-05-24 19:35         ` Stefan Monnier
2019-05-24 12:31     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834l5k5907.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).