Tried to search the internet for help, but could not get any.
So I am sorry to ask for help here. I know this board is
not the best place for emacs problems, but LQ is the best
place for me.
I am defining abbrevs in .abbrev_defs. I want to type hsp followed by space
and then get \hspace{} and place the point(cursor) inside the curly quote.
I have the following in my abbrev_defs:
("hsp" "\\hspace{}" backward-char 1)
However, when I edit a file using emacs (not xemacs), what I get is:
\hspace{ }, there is one extra space between {}. And if I write
a function to insert a bunch of texts and use abbrev by calling
the function, I got it right. What's going on here?
I cannot understand why emacs inserts an extra space by move
the point(cursor) forward or backward. Because if I use
("hsp" "\\hspace{}" nil 1), then I will get \hspace+space, then there
is the cursor. I even tried to use backward-delete, but emacs still
treats LISP(backward-delete-char, or backward-char) differently
from using M-x backward-delete-char and M-x backward-char.
Can anyone point out where I am lost?
Thanks very much.