From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tyler Newsgroups: gmane.emacs.help Subject: Re: html-mode: adding tags to html-tag-alist Date: Wed, 15 Jul 2009 12:23:10 -0300 Message-ID: <874otenf6p.fsf@blackbart.sedgenet> References: <878wiqogud.fsf@blackbart.sedgenet> <4A5DB363.70902@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247672343 12920 80.91.229.12 (15 Jul 2009 15:39:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jul 2009 15:39:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 15 17:38:56 2009 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 1MR6ZJ-00070L-OS for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jul 2009 17:38:54 +0200 Original-Received: from localhost ([127.0.0.1]:52956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR6ZJ-00030I-7Y for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jul 2009 11:38:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MR6KU-0004m0-1B for help-gnu-emacs@gnu.org; Wed, 15 Jul 2009 11:23:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MR6KP-0004kT-14 for help-gnu-emacs@gnu.org; Wed, 15 Jul 2009 11:23:33 -0400 Original-Received: from [199.232.76.173] (port=47100 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR6KO-0004kQ-OA for help-gnu-emacs@gnu.org; Wed, 15 Jul 2009 11:23:28 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:47162 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MR6KO-0005sD-CU for help-gnu-emacs@gnu.org; Wed, 15 Jul 2009 11:23:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MR6KL-0004hE-MH for help-gnu-emacs@gnu.org; Wed, 15 Jul 2009 15:23:25 +0000 Original-Received: from hlfxns0169w-142068217114.pppoe-dynamic.ns.aliant.net ([142.68.217.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jul 2009 15:23:25 +0000 Original-Received: from tyler.smith by hlfxns0169w-142068217114.pppoe-dynamic.ns.aliant.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jul 2009 15:23:25 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 55 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hlfxns0169w-142068217114.pppoe-dynamic.ns.aliant.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:6UgY76mAUhVVui8MKZSeeJDslN0= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:66112 Archived-At: Bernardo writes: >> >> I'm trying to customize html-mode, but I'm having trouble with the >> skeleton stuff. I want to get a prompt for class or id for div tags, but >> I can't figure out how to do it. I think I have to change >> html-tags-alist somehow, but I'm not sure how, or if there's anything >> else I need to do in addition. The manual is pretty skimpy on this >> topic, and I'm missing a few steps between the description of skeletons >> in the wiki and the application of the skeletons in html-mode. > > i've bookmared this (if you are keen for more reading): > http://www.panix.com/~tehom/my-code/skel-recipe.txt > > and there is always EmacsWiki: > http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode Thanks for your help, but that's not where my problem is. I can follow, sort of, the instructions for setting up a basic skeleton. What I need to know how to do is to modify the html-tag-alist in html-mode to get it to do what I want with div tags. The help for sgml-tag says: Prompt for a tag and insert it, optionally with attributes. Completion and configuration are done according to `sgml-tag-alist'. It goes on to say that this is built on skeleton-insert, pointing to that help page. The basic syntax of skeletons I'm beginning to understand, so I looked at the help for sgml-tag-alist. This page describes two different alists, TAGRULE and ATTRIBUTERULE. This variable is customizable, so I opened the customize dialogue and added a new cons-cell with Tag Name: div, but I can't figure out a Tag Rule that will provide class and id as options, and also separate the start and end tags with a newline. A further complication is that whatever I do in the customize dialogue gets overwritten by the hard-coded contents of html-tag-alist anyways, so it doesn't really matter. So what I'm wondering now is if it is even possible to modify the way sgml-tag works in html-mode, and if so, how? I could probably figure out how to write my own skeleton from scratch and have that loaded with an html-mode-hook, but that seems silly when html-mode is so close to providing everything I'm looking for. Any other suggestions? Thanks! Tyler -- There is something fascinating about science. One gets such wholesale returns of conjecture out of such a trifling investment of fact. --Mark Twain