From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Peter Michaux" Newsgroups: gmane.emacs.help Subject: Trouble using snippet.el with abbrev tables Date: Mon, 4 Feb 2008 17:09:41 -0800 Message-ID: <3cbaf1c80802041709u2654bb9cqc393c69244ad5c89@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202176109 10541 80.91.229.12 (5 Feb 2008 01:48:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 01:48:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 05 02:48:50 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JMCvZ-0007xk-6g for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 02:48:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMCv7-00028k-4D for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Feb 2008 20:48:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMCJl-0005LX-T4 for help-gnu-emacs@gnu.org; Mon, 04 Feb 2008 20:09:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMCJk-0005Kq-8h for help-gnu-emacs@gnu.org; Mon, 04 Feb 2008 20:09:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMCJk-0005Kn-3X for help-gnu-emacs@gnu.org; Mon, 04 Feb 2008 20:09:44 -0500 Original-Received: from wa-out-1112.google.com ([209.85.146.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMCJk-0007iQ-CH for help-gnu-emacs@gnu.org; Mon, 04 Feb 2008 20:09:44 -0500 Original-Received: by wa-out-1112.google.com with SMTP id k34so2582726wah.10 for ; Mon, 04 Feb 2008 17:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=1DqkjNyk2MbE2WDBRmo+kzmNOceZB/LFyClmS6L+rVQ=; b=oRmCIK4cbUmgQ34IeO249zIbcORFhAt9X6SFdDz8lSimAQqhJS1IW2q8LpJ6/p0VHu1nrqHhDS2ztJpcTNqpxVqJnPzvVZz6uLjj//qrbvnjxbBHlvrwYwDRtPmlZDCy5TOqZmXgFhJ4AarHq5yE6bvSoYTi0UmxkW65iughk9Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=LGizmI+qnTUo2gBVEDkpDpRh+pAXjOtGY/Ag7OyEkXAspzrTCrnEy1/2BVJv4PaaXNoLP9muYqWmwqu8461jdgJezWrl/ho1sKtj/awJnZoY/DFts7FUOK8irEcuWZGJDyPDyNqQse8bxLL8HhLe9ND8fTYiUYvtfWJc14r6Gno= Original-Received: by 10.114.103.1 with SMTP id a1mr7664336wac.45.1202173781393; Mon, 04 Feb 2008 17:09:41 -0800 (PST) Original-Received: by 10.114.77.10 with HTTP; Mon, 4 Feb 2008 17:09:41 -0800 (PST) Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 04 Feb 2008 20:47:05 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51212 Archived-At: 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