From: ········@my-deja.com
Subject: syntax highlighting
Date: 
Message-ID: <8pun6e$fbc$1@nnrp1.deja.com>
hello,

   what is the best way to syntax highlight lisp code in html form?
that is, produce syntax highlighted lisp code from text to html tags.
there are a ton of tools like this for c and c++, but I have not seen
any for lisp.  I want to be able to do this without converting my plain
text files with lisp code to TeX.

thanks,
  -- john

IF FORTH HONK THEN


Sent via Deja.com http://www.deja.com/
Before you buy.

From: Rahul Jain
Subject: Re: syntax highlighting
Date: 
Message-ID: <8puq4u$il4$1@joe.rice.edu>
In article <············@nnrp1.deja.com>, ········@my-deja.com wrote:
> hello,
> 
>    what is the best way to syntax highlight lisp code in html form?
> that is, produce syntax highlighted lisp code from text to html tags.
> there are a ton of tools like this for c and c++, but I have not seen
> any for lisp.  I want to be able to do this without converting my plain
> text files with lisp code to TeX.

I use vim and it works fine for doing this.
www.vim.org


-- Rahul
From: Christian Nyb�
Subject: Re: syntax highlighting
Date: 
Message-ID: <873dj01wwk.fsf@lapchr.siteloft.com>
········@my-deja.com writes:

> what is the best way to syntax highlight lisp code in html form?
> that is, produce syntax highlighted lisp code from text to html
> tags.  there are a ton of tools like this for c and c++, but I have
> not seen any for lisp.  I want to be able to do this without
> converting my plain text files with lisp code to TeX.

If you have emacs installed, you could try htmlize.el by Hrvoje
Nicksic, available at <URL:http://jagor.srce.hr/~hniksic/htmlize.el>

From the source of htmlize:

;; This package analyses the text properties of the buffer and
;; converts them, along with the text, to HTML.  Mail to
;; <·······@srce.hr> to discuss features and additions.  All
;; suggestions are more than welcome.

;; To use, just switch to a buffer you want HTML-ized, and type `M-x
;; htmlize-buffer'.  After that, you should find yourself in an HTML
;; buffer, which you can save.  Alternatively, `M-x htmlize-file' will
;; find a file, font-lockify the buffer, and save the HTML version,
;; all before you blink.  Even more alternatively, `M-x
;; htmlize-many-files' will prompt you for a slew of files to undergo
;; the same treatment.  `M-x htmlize-many-files-dired' will do the
;; same for the files marked by dired.

Here's a sample:

Plaintext:

(defun annuity (pv r periods)
  "Return the anniuty given present value PV, interest rate R,
and number of periods PERIODS."
    (/ 1 (/  
	(/ 
	 (1- 
	  (expt (1+ r) (- periods)))
	 r)
	pv)))

Htmlized:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!-- Created by htmlize-0.49 in css mode. -->
<html>
  <head>
    <title>test.cl</title>
    <style type="text/css">
    <!--
      BODY {
        color: #000000;
        background-color: #cccccc;
      } /* default */
      span.string {
        color: #008b00;
      } /* font-lock-string-face */
    -->
    </style>
  </head>
  <body>
    <pre>
(defun annuity (pv r periods)
  &quot;<span class="string">
Return the anniuty given present value PV, interest rate R,
	 and number of periods PERIODS.</span>&quot;
    (/ 1 (/  
	(/ 
	 (1- 
	  (expt (1+ r) (- periods)))
	 r)
	pv)))

</pre>
  </body>
</html>
-- 
chr
From: felix
Subject: Re: syntax highlighting
Date: 
Message-ID: <ss6oomqjh3t140@corp.supernews.com>
>IF FORTH HONK THEN


Wasn't it:

IF FORTH LOVE HONK THEN

?


cheers,
felix
From: Joseph Dale
Subject: Re: syntax highlighting
Date: 
Message-ID: <39C39BB4.BE684771@home.com>
felix wrote:
> 
> >IF FORTH HONK THEN
> 
> Wasn't it:
> 
> IF FORTH LOVE HONK THEN
> 

No, 

FORTH LOVE IF HONK THEN
From: Michael Parker
Subject: Re: syntax highlighting
Date: 
Message-ID: <8q05n7$veg$1@nnrp1.deja.com>
In article <············@nnrp1.deja.com>,
  ········@my-deja.com wrote:

> IF FORTH HONK THEN

... will cause a stack underflow.

try this instead:

FORTH IF HONK THEN


Sent via Deja.com http://www.deja.com/
Before you buy.