[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slickedit features in Emacs?
From: |
Peter Lee |
Subject: |
Re: Slickedit features in Emacs? |
Date: |
Fri, 23 May 2003 15:44:09 GMT |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt) |
>>>>> "Mark" == Mark Mynsted <mmynsted_news@gbronline.com> writes:
>>>>> "Stefan" == Stefan Monnier
>>>>> <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:
>>> - There should be a way to capture the name of the mode using
>>> mode-name from the hook added to 'c-mode-common-hook, such
>>> that when the hook gets called it finds the name, translates
>>> that to the correct abbrev table name then adds the abbrev to
>>> the applicable table. If you get that working, I would like
>>> to use it myself. :-)
Stefan> What's wrong with `local-abbrev-table' ?
Mark> That is great. Now the following will work exactly as
Mark> requested, i.e. it will work for any mode that triggers the
Mark> c-mode-common-hook:
Mark> (define-skeleton my-skeleton-c-if "Insert a c if statement"
Mark> nil "if (" > _ ")" \n "{" '(indent-for-tab-command) \n \n
Mark> "}" '(indent-for-tab-command))
Mark> (defun my-c-mode-common-hook () (define-abbrev
Mark> local-abbrev-table "ifx" "" 'my-skeleton-c-if)) (add-hook
Mark> 'c-mode-common-hook 'my-c-mode-common-hook)
Ahhh that's what I was looking for... Thanks Stefan and Mark.
- Re: Slickedit features in Emacs?, (continued)
- Re: Slickedit features in Emacs?, Henrik Jönsson, 2003/05/22
- Re: Slickedit features in Emacs?, Bruce Ashfield, 2003/05/22
- Re: Slickedit features in Emacs?, Stefan Monnier, 2003/05/22
- Re: Slickedit features in Emacs?, Peter Lee, 2003/05/22
- Re: Slickedit features in Emacs?, Mark Mynsted, 2003/05/22
- Re: Slickedit features in Emacs?, Peter Lee, 2003/05/22
- Re: Slickedit features in Emacs?, Kai Großjohann, 2003/05/22
- Re: Slickedit features in Emacs?, Mark Mynsted, 2003/05/22
- Re: Slickedit features in Emacs?, Stefan Monnier, 2003/05/22
- Re: Slickedit features in Emacs?, Mark Mynsted, 2003/05/23
- Re: Slickedit features in Emacs?,
Peter Lee <=
Re: Slickedit features in Emacs?, Peter Lee, 2003/05/21
Re: Slickedit features in Emacs?, Burton Samograd, 2003/05/21
Re: Slickedit features in Emacs?, Phillip Lord, 2003/05/21
Re: Slickedit features in Emacs?, Ole Laursen, 2003/05/21
Re: Slickedit features in Emacs?, Stefan Monnier, 2003/05/21
Re: Slickedit features in Emacs?, Kai Großjohann, 2003/05/22