* fiddling with SGML/HTML mode
@ 2010-02-03 6:03 Eric Abrahamsen
2010-02-03 6:26 ` Kevin Rodgers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Abrahamsen @ 2010-02-03 6:03 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
Very briefly: is there a way to convince html-mode that when I use
sgml-tag to insert a <div> tag, it should give me the option of adding
a class or id attribute? Can I do this without editing the source code?
Thanks!
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fiddling with SGML/HTML mode
2010-02-03 6:03 fiddling with SGML/HTML mode Eric Abrahamsen
@ 2010-02-03 6:26 ` Kevin Rodgers
[not found] ` <mailman.633.1265178421.14305.help-gnu-emacs@gnu.org>
2010-02-03 21:04 ` Tyler Smith
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2010-02-03 6:26 UTC (permalink / raw)
To: help-gnu-emacs
Eric Abrahamsen wrote:
> Very briefly: is there a way to convince html-mode that when I use
> sgml-tag to insert a <div> tag, it should give me the option of adding a
> class or id attribute? Can I do this without editing the source code?
You should be able to frob html-tag-alist.
But that begs the question: Why doesn't html-mode support HTML 4?
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fiddling with SGML/HTML mode
[not found] ` <mailman.633.1265178421.14305.help-gnu-emacs@gnu.org>
@ 2010-02-03 19:38 ` Stefan Monnier
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2010-02-03 19:38 UTC (permalink / raw)
To: help-gnu-emacs
> But that begs the question: Why doesn't html-mode support HTML 4?
Because nobody provided a patch for it,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fiddling with SGML/HTML mode
2010-02-03 6:03 fiddling with SGML/HTML mode Eric Abrahamsen
2010-02-03 6:26 ` Kevin Rodgers
[not found] ` <mailman.633.1265178421.14305.help-gnu-emacs@gnu.org>
@ 2010-02-03 21:04 ` Tyler Smith
2 siblings, 0 replies; 4+ messages in thread
From: Tyler Smith @ 2010-02-03 21:04 UTC (permalink / raw)
To: help-gnu-emacs
Eric Abrahamsen <girzel@gmail.com> writes:
> Very briefly: is there a way to convince html-mode that when I use
> sgml-tag to insert a <div> tag, it should give me the option of adding
> a class or id attribute? Can I do this without editing the source
> code?
>
You can customize Sgml Tag Alist. The syntax is kind of awkward until
you're familiar with skeletons. I've got the following set in my
customize page:
Sgml Tag Alist: Hide Value
<snipped>
INS DEL Cons-cell:
Tag Name: div
Tag Rule:
INS DEL Lisp expression: ("class"
("clear")
("default"))
INS DEL Lisp expression:
("id"
("wrapper")
("article")
("content")
("nav")
("primary")
("secondary")
("sidebar")
("header")
("footer-content")
("footer-web"))
This change results in my being prompted for attributes when I insert a
div. If I choose class or id, I have tab completion for the values in
the lists.
There are some tags that don't work as expected via the customize
framework. p, h*, ol, and some others are effectively hard-coded. They
appear in html-tag-alist before the sgml-tag-alist gets inserted, so any
customizations are ignored. To get around this I've hard-coded a few
hacks of my own into my .emacs. I've been meaning to look into whether
or not this is worth writing up into a proper patch, but just haven't
had time.
Cheers,
Tyler
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-03 21:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 6:03 fiddling with SGML/HTML mode Eric Abrahamsen
2010-02-03 6:26 ` Kevin Rodgers
[not found] ` <mailman.633.1265178421.14305.help-gnu-emacs@gnu.org>
2010-02-03 19:38 ` Stefan Monnier
2010-02-03 21:04 ` Tyler Smith
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.