Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emacs abbreviation and skeleton questions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Shadow Skill
Veteran
Veteran


Joined: 04 Dec 2004
Posts: 1023

PostPosted: Tue Oct 31, 2006 8:49 am    Post subject: Emacs abbreviation and skeleton questions Reply with quote

I figured I would take a stab at setting up abbreviations in emacs this morning and I cannot seem to get it to do what I want. I tried the following as a basic skeleton and managed to get it to output the statement correctly but I could not get ";ife" to automagically expand like I want here is what I have so far:
Code:

(define-abbrev ruby-mode-abbrev-table ";ife"
      "" 'ruby-skeleton-if-else-endif)

    (define-skeleton ruby-skeleton-if-else-endif
      "Insert an if - else - end if region" nil
     " if" "" _""   \n
       >"elsif" \n
\n
>""_""\n
     -3"end")


It would be great if the abbreviation could be made to prompt for the conditions for the if and the else clause as well.

Any pointers to getting this thing working will be greatly appreciated.

Also is there someway to save skeletons in a file so that they are available for use every time I load emacs? (I would prefer not to use the .emacs file for skeletons.)
_________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.

"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it."
Back to top
View user's profile Send private message
Shadow Skill
Veteran
Veteran


Joined: 04 Dec 2004
Posts: 1023

PostPosted: Mon Nov 13, 2006 10:18 am    Post subject: Reply with quote

no one at all?
_________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.

"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it."
Back to top
View user's profile Send private message
jcornez
Apprentice
Apprentice


Joined: 12 Jan 2006
Posts: 201
Location: Spain

PostPosted: Tue Nov 14, 2006 3:48 pm    Post subject: Reply with quote

I don't use skeleton-mode myself, so I'm not sure. But have you looked here?

http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum