[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trouble using snippet.el with abbrev tables
From: |
Peter Michaux |
Subject: |
Trouble using snippet.el with abbrev tables |
Date: |
Mon, 4 Feb 2008 17:09:41 -0800 |
Hi,
I'm new to Emacs and having trouble getting snippet.el working.
http://www.kazmier.com/computer/snippet.el
The instruction in the file may be good for an Emacs expert but I'm
still missing something.
I've tried various combinations of the following configuration in my
.emacs file with no luck.
(autoload 'javascript-mode "javascript" nil t)
(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
(load "snippet")
(add-hook 'javascript-mode-hook
(lambda ()
; someone suggested the following line but it seems redundant
(require 'javascript-mode)
(abbrev-mode 1)
(define-abbrev-table 'javascript-mode-abbrev-table ())
(snippet-with-abbrev-table 'javascript-mode-abbrev-table
("for" . "for $${element} in $${sequence}:")
("im" . "import $$")
("if" . "if $${True}:")
("wh" . "while $${True}:"))
))
Not only does it not work but it seems horribly inefficient to define
a new abbrev table each time the JavaScript mode starts.
Any ideas? Does anyone have it working?
Thanks,
Peter
- Trouble using snippet.el with abbrev tables,
Peter Michaux <=