unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: ross@rosslaird.info (Ross A. Laird)
To: help-gnu-emacs@gnu.org
Subject: Re: abbreviations
Date: Fri, 17 Oct 2008 23:37:12 -0700	[thread overview]
Message-ID: <87fxmupfxj.fsf@rosslaird.info> (raw)
In-Reply-To: 48f88165$0$40312$4fafbaef@reader5.news.tin.it

Joubert <iamsoooawesome@yahoo.com> writes:

> but I don't see my abbreviations autocompleting or anything at all for 
> that matter.

Here's what I do (this may not be the best way to do it...):

I have a file called .abbrev_defs (it can be called anything).
In my .emacs file, I have this:

(setq-default abbrev-mode t)
(read-abbrev-file "~/.abbrev_defs")

I put my abbreviations in this file, eg:

(define-abbrev-table 'global-abbrev-table '(    (

    ("recieving" "receiving" nil 1)
    ("occurence" "occurrence" nil 1)
    ("recieves" "receives" nil 1)
    ("downlaod" "download" nil 1)
    ("recieve" "receive" nil 2)
    ("recieved" "received" nil 1)


    ))

You can also use various keys to add abbreviations (from the info file
for autocomplete):

`C-x a g'
     Define an abbrev, using one or more words before point as its
     expansion (`add-global-abbrev').

`C-x a l'
     Similar, but define an abbrev specific to the current major mode
     (`add-mode-abbrev').

`C-x a i g'
     Define a word in the buffer as an abbrev
     (`inverse-add-global-abbrev').

`C-x a i l'
     Define a word in the buffer as a mode-specific abbrev
     (`inverse-add-mode-abbrev').

And:

`M-x write-abbrev-file <RET> FILE <RET>'
     Write a file FILE describing all defined abbrevs.

`M-x read-abbrev-file <RET> FILE <RET>'
     Read the file FILE and define abbrevs as specified therein.

`M-x quietly-read-abbrev-file <RET> FILE <RET>'
     Similar but do not display a message about what is going on.


This works well for me.

Cheers.

Ross


-- 
Ross A. Laird, PhD
www.rosslaird.info





  reply	other threads:[~2008-10-18  6:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 12:13 abbreviations Joubert
2008-10-18  6:37 ` Ross A. Laird [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-06 20:43 abbreviations David Ellis
2002-08-12 16:09 ` abbreviations Fernando Dobladez

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=87fxmupfxj.fsf@rosslaird.info \
    --to=ross@rosslaird.info \
    --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).