help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about abbrev


From: Xah
Subject: Re: Questions about abbrev
Date: Thu, 1 May 2008 14:12:36 -0700 (PDT)
User-agent: G2/1.0

Nathan, TheLonelyStar <nab...@lonely-star.org> wrote:
«I am trying to get abbrev to work. I added this to my .emacs:»

Here's what i have. just put in your “.emacs”:

(setq save-abbrevs nil)

(define-abbrev-table 'global-abbrev-table '(
    ("tin" "∈" nil 0)
    ("tnin" "∉" nil 0)
    ("tinfinity" "∞" nil 0)

    ("luv" "♥" nil 0)

    ("twdy" "wordy-english@yahoogroups.com" nil 0)

    ("twp" "Wikipedia" nil 0)
    ("tpr" "POV-Ray" nil 0)
    ("tsl" "Second Life" nil 0)
    ("tmma" "Mathematica" nil 0)

    ("txl" "http://xahlee.org/"; nil 0)

    ("tpic" "Picture\\ \\([0-9]+\\)\\.png" nil 0)

    ("tditto" "ditto -ck --sequesterRsrc " nil 0)
    ("tcvt" "convert -quality 85%" nil 0)
    ("tcvt256" "convert +dither -colors 256 " nil 0)
    ("tcvtf" "find . -name \"*png\" | xargs -l -i basename -s \".png\"
\"{}\" | xargs -l -i  convert -quality 85% \"{}.png\" \"{}.jpg\"" nil
0)

    ("tk" "kill `ps auwwx | grep -E 'Resources/TruBlueEnvironment' |
grep -v grep | awk '{print $2}'`" nil 0)

    ("t0" "find . -size 0" nil 0)
    ("t00" "find . -size 0 -exec rm {} \\;" nil 0)

    ("trsync" "rsync -z -av --exclude=\"*~\"  --exclude=\".DS_Store\"
--exclude=\".bash_history\"  --exclude=\"*/_curves_robert_yates/*.png
\" --exclude=\"logs/*\"  --exclude=\"xlogs/*\" --delete --rsh=\"ssh -l
some\" ~/web/ some@someus:~/" nil 0)
    ))

this directly setup your abbrev table, and set save-abbrevs to false.
So, it bypass emacs asking you to save it as a standard abbrev file.

oh, you also need to turn abbrev on. I have in my

(custom-set-variables
 '(abbrev-mode t)
 ...
)

«Should abbrev now replace the abbrevation I just typed in?  And, when
I later type the abbrevation, it is not replaced.  What am I missing?»

Remember, when abbrev will expand after you type space or return.

  Xah
  xah@xahlee.org
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]