Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Writing HTML with S-expression
Emacs Lisp
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
stag.el

README.md

stag.el --- Writing HTML with S-expression

Install

(require 'stag)
(define-key sgml-mode-map (kbd "C-c C-e") 'stag-convert-last-sexp)

Summary

<html>
  <head>
    <title>Writing HTML with S-expression</title>
  </head>
  <body>
    (div :id "main"
       (h1 "Stag")
       (ul :class "navi"
         (li (a :href "/menu1" "menu 1"))
         (li (a :href "/menu2" "menu 2"))
         (li (a :href "/menu3" "menu 3"))))_
  </body>
</html>

press C-c C-e at _

<html>
  <head>
    <title>Writing HTML with S-expression</title>
  </head>
  <body>
    <div id="main">
      <h1>Stag</h1>
      <ul class="navi">
        <li>
          <a href="/menu1">menu 1</a>
        </li>
        <li>
          <a href="/menu2">menu 2</a>
        </li>
        <li>
          <a href="/menu3">menu 3</a>
        </li>
      </ul>
    </div>_
  </body>
</html>
Something went wrong with that request. Please try again.