all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trouble using snippet.el with abbrev tables
@ 2008-02-05  1:09 Peter Michaux
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Michaux @ 2008-02-05  1:09 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-08  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6981.1202176026.18990.help-gnu-emacs@gnu.org>
2008-02-05 19:21 ` Trouble using snippet.el with abbrev tables Niels Giesen
2008-02-07  5:56   ` Peter Michaux
     [not found]   ` <mailman.7103.1202389882.18990.help-gnu-emacs@gnu.org>
2008-02-08  7:57     ` Niels Giesen
2008-02-05  1:09 Peter Michaux

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.