From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: table.el downcase HTML tags Date: Wed, 31 May 2006 10:33:25 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: <20060530.101335.127866384.Takaaki.Ota@am.sony.com> <7dbe73ed0605301223s23b0bee6x6f458068ad408a79@mail.gmail.com> <447CA3DC.4060006@student.lu.se> <37314.128.165.123.132.1149026931.squirrel@webmail.lanl.gov> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1149086067 21728 80.91.229.2 (31 May 2006 14:34:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 May 2006 14:34:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 31 16:34:25 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FlRm9-0005us-8h for ged-emacs-devel@m.gmane.org; Wed, 31 May 2006 16:34:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlRm8-0006X4-MD for ged-emacs-devel@m.gmane.org; Wed, 31 May 2006 10:34:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlRlv-0006Wn-OB for emacs-devel@gnu.org; Wed, 31 May 2006 10:34:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlRlv-0006WZ-8n for emacs-devel@gnu.org; Wed, 31 May 2006 10:34:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlRlv-0006WV-3t for emacs-devel@gnu.org; Wed, 31 May 2006 10:34:07 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FlRrx-0002sF-0f for emacs-devel@gnu.org; Wed, 31 May 2006 10:40:21 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FlRlg-0005ps-Em for emacs-devel@gnu.org; Wed, 31 May 2006 16:33:52 +0200 Original-Received: from fw01.cmbrmaks.akamai.com ([80.67.64.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 May 2006 16:33:52 +0200 Original-Received: from tzz by fw01.cmbrmaks.akamai.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 May 2006 16:33:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 31 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: fw01.cmbrmaks.akamai.com X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:G3LMNTep8DRsKxpsNplMEdP6iic= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55517 Archived-At: On 30 May 2006, herring@lanl.gov wrote: > I'd use > > (defun table--generate-source-html-tag (tag &optional body attrs) > (when table-uppercase-html-tags (setq tag (upcase tag))) > (concat "<" tag (if attrs " ") attrs > (if body (concat ">" body "")) > > giving > > (table--generate-source-html-tag "a" "b" "c=d") > => "b" > (table--generate-source-html-tag "a") > => "" Sure, that works :) > I removed the spaces around the body because they could break things and > are trivial to include in the argument. I'd really be tempted to make > attrs an alist, but that might be overengineering the problem. The > XML-style empty tags might be undesirable, but they're optional: > > (table--generate-source-html-tag "a" "") > => "" Actually all this and more is covered by sgml-mode's sgml-tag (and friends). Perhaps they should be used here instead of reinventing the wheel. Ted