#!/usr/bin/perl -w $use_archive = 0; # ignore the archive for now. &read_archive_files(); $dummy_file = "first"; $file = $dummy_file; $site = ""; $author = ""; $ellfile = $ARGV[0]; $counts = `grep '^;;;' $ellfile | wc -l`; ($num_entries) = $counts =~ /(\d+)/; $first_entry = 1; $last_file = ""; ### Print out header info. $date = localtime; print < Emacs Lisp List

Emacs Lisp List

Last updated: $date

$num_entries entries

Mail me (sje30\@cam.ac.uk) with any suggestions for changes to this list.

View recent changes to the list.

END0 print < Sat 24 Jun 2006. Update ell.el to point to ELL at Cambridge.

Mon 20 Sep 2004. Nascif Abousalh-Neto has fixed a bug in ell.el - some entries were not found. The new version of ell.el now parses the XML file rather than html.

Fri 22 Nov 2002. Visit the EmacsWiki if you are looking for somewhere to upload your lisp file. (Do post it to gnu.emacs.sources too.)

Wed 23 Oct 2002. Thanks to the efforts of Nascif Abousalh-Neto, the list can now be viewed by the date when an entry for a lisp file was updated. Please see the list sorted by date. END1 print <Please read the cover notes for more details.


END2 ### Process the entries. ### Entries are terminated by the line "Authors:" in the source file. &write_index(); $next_letter = 'a'; @letters_found = (); while (<>) { if (/^;;;\s-*(.*)$/) { &write_record(); $file = $1; } elsif (/^S:\s-*(.*)$/) { $site = $1; } elsif (/^A:\s-*(.*)$/) { $author = $1; } elsif (/^N:\s-*(.*)$/) { $note = $1; } elsif (/^Authors:$/) { # start processing the authors. last; # bail out of loop } } write_record(); # write out the last record. print STDERR "letters found: @letters_found\n"; write_index(); write_footer(); # write out the code for bottom of page. sub write_index { ## Put the links into each bit of the alphabet. print "\n

Quick jump to first entry with this letter:\n"; for ('a' .. 'z') { print "$_\n"; } print "

\n"; } sub write_record { return if $file eq $dummy_file; $filename = "xx.el"; #print "file is $file\n"; if (!defined($author)) { printf STDERR "author not defined - line %d\n", $.; exit(-1); } if (!defined($site)) { printf STDERR "site not defined - line %d\n", $.; exit(-1); } if (($filename, $desc) = $file =~ /^(\S+)\s+(.+)$/) { ## For comparing filename with previous, we need to remove ## .el and turn entries into lowercase. $sfilename = $filename; $sfilename =~ s/\.el$//; # remove .el if it exists. $sfilename = lc $sfilename; # turn lower. if ((!$first_entry) && ($last_file gt $sfilename)) { print STDERR "warning: $last_file gt $sfilename\n"; } $last_file = $sfilename; $first_entry = 0; $first = substr($filename, 0, 1); if ($first ge $next_letter) { ##print "found first instance of $next_letter\n"; ##print "\n\n"; print "\n

\u$next_letter

\n"; $next_letter++; ##print "now look for $next_letter\n"; push @letters_found, $first; } $site =~ s/&/&/g; print "\n

$filename\n$desc"; } else { print STDERR "error parsing $file, space at start of line?\n"; } # Use a neutral term like contact rather than author, so that it covers # multiple authors. print "
\nContact: $author"; if (defined $note) { print "
\nNote: $note"; } print "\n"; if ($use_archive && exists($archive{$filename})) { ##print "$filename is in the archive\n"; ##print "
Archived\n"; print "
Archived\n"; } ### remove values from perl now... undef $site; undef $filename; undef $desc; undef $author; undef $file; undef $note; } sub write_footer { print < ENDFOOTER } sub read_archive_files { ## Read in the archive status file to see which files are available. ## Then we can link to them. open(FP, "lispmeralda-status") || die "Cannot open archive file"; $references=0; while() { if (!$references) { if (/^References$/) { $references = 1; } } else { ## process this line. if (/elisp-archive.All.(.*)$/) { ## we have an archive entry. ##print "found $1\n"; $archive{$1} = 1; } } } } __END__ =head1 NAME ellgen - Generate the ELL files =head1 SYNOPSIS ellgen [options] [files] =head1 DESCRIPTION ellgen ell > ell.html to create the HTML file. =head1 OPTIONS =head1 ENVIRONMENT =head1 EXAMPLES =head1 FILES =head1 AUTHOR Stephen Eglen stephen@gnu.org =head1 SEE ALSO =head1 DIAGNOSTICS =head1 BUGS =cut