unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs 22.2.1 scripting help
@ 2011-01-05  3:43 Peter Keller
  0 siblings, 0 replies; only message in thread
From: Peter Keller @ 2011-01-05  3:43 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I am not an expert in elisp, but have a problem I would like to solve.
I've poked the elisp manual for a while, but am at a loss.

I've written an elisp script whose intention is to load the comida
color theme, customize it with a lisp-mode-hook, load a buffer,
indent it, fontify it, htmlize it, and write it to a new file. This
script is ultimately intended to do batch processing of lisp files
into html documents.

What I can say that does work is the comida color theme is used and it appears
a very small subset of my changes in the lisp-mode-hook are performed, but
not all.

My script can be found at:

http://pages.cs.wisc.edu/~psilord/cssit.el

To run it, be in a directory full of lisp files and the above script and then:
  emacs --script cssit.el

When run on a lisp file in batch mode, the resultant output doesn't
color all the Common Lisp functions green as an example of its
wrongness. Lisp keywords like :foobar are supposed to be white, but aren't.

I know that with (htmlize-buffer), I have to have the current buffer selected
and have to do the font locking myself. I've done this (or at least I think I
have), but I just can't get the behavior for which I am looking.

If I use htmlize-buffer in an interactive emacs session using the above
lisp-mode-hook and color theme, I get the correct output. I don't know what
is different between the interactive version of emacs and the script I am
writing.

Any help would be appreciated.

Thank you.

-pete


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-05  3:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05  3:43 emacs 22.2.1 scripting help Peter Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).