LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-25-2007, 09:49 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Rep: Reputation: 30
emacs LISP, backward/forward-char problem, puts one extra space, why?


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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs lisp problem, how to force to add " to path parv Linux - Software 8 03-07-2007 05:22 PM
change kaffeine/xine skip forward/backward value demmylls Linux - Software 0 04-29-2006 11:23 PM
Going backward to go forward Wonderer Slackware 1 01-31-2004 07:14 AM
Thumbbuttons under fluxbox wont do forward/backward in moz firebird Festiz Linux - Hardware 1 01-18-2004 03:48 PM
Lisp, emacs-lisp aizkorri Programming 1 09-04-2002 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration