summaryrefslogtreecommitdiffstats
path: root/top-refs.scm
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2005-11-02 14:55:21 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:32 -0800
commit34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73 (patch)
tree1189d06a81277bcf8539b0260a69a19f6038effb /top-refs.scm
parent611b3db17894e5fdc0db3d49eaf6743d27b44233 (diff)
parent5145dd3aa0c02c9fc496d1432fc4410674206e1d (diff)
downloadslib-34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73.tar.gz
slib-34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73.zip
Import Debian changes 3a2-1debian/3a2-1
slib (3a2-1) unstable; urgency=low * New upstream release. * Acknowledge NMU. (Closes: #281809) * Makefile: Don't hack Makefile; use rules instead. * debian/rules: Set on make invocations: prefix, htmldir, TEXI2HTML. * debian/rules (clean): Clean more stuff here. * Makefile: Comment out old rule for $(htmldir)slib_toc.html. Instead, specify directly that the texi2html invocation produces that file. * debian/rules (binary-indep): Find web files in slib subdir. * debian/control (Build-Depends-Indep): Go back to using scm.
Diffstat (limited to 'top-refs.scm')
-rw-r--r--top-refs.scm48
1 files changed, 26 insertions, 22 deletions
diff --git a/top-refs.scm b/top-refs.scm
index 29e25dc..3647dc4 100644
--- a/top-refs.scm
+++ b/top-refs.scm
@@ -74,12 +74,13 @@
(define (top-refs:include filename)
(cond ((not (and (string? filename) (file-exists? filename)))
(top-refs:warn 'top-refs:include 'skipping filename))
- (else (fluid-let ((*load-pathname* filename))
- (call-with-input-file filename
- (lambda (port)
- (do ((exp (read port) (read port)))
- ((eof-object? exp))
- (top-refs:top-level exp))))))))
+ (else (call-with-input-file filename
+ (lambda (port)
+ (with-load-pathname filename
+ (lambda ()
+ (do ((exp (read port) (read port)))
+ ((eof-object? exp))
+ (top-refs:top-level exp)))))))))
(define (top-refs:top-level exp)
(cond ((not (and (pair? exp) (list? exp)))
@@ -238,7 +239,7 @@
;;@dots{} (info) indexes of @1. The identifiers have the case that
;;the implementation's @code{read} uses for symbols. Identifiers
;;containing spaces (eg. @code{close-base on base-table}) are
-;;@emph{not} included.
+;;@emph{not} included. #f is returned if the index is not found.
;;
;;Each info index is headed by a @samp{* Menu:} line. To list the
;;symbols in the first and third info indexes do:
@@ -266,20 +267,23 @@
(do ((line (read-line port) (read-line port)))
((or (eof-object? line)
(not (and (> (string-length line) 5)
- (string=? "* " (substring line 0 2)))))
+ (or (string=? "* " (substring line 0 2))
+ (substring? "(line " line)))))
(loop (read-line port) (+ 1 iidx) (cdr ndxs)))
- (let ((<n> (substring? " <" line)))
- (define csi (or (and <n>
- (> (string-length line) (+ 3 <n>))
- (string-index
- "0123456789"
- (string-ref line (+ 2 <n>)))
- <n>)
- (substring? ": " line)))
- (and
- csi
- (let ((str (substring line 2 csi)))
- (if (and (not (substring? " " str))
- (not (memq (string-ci->symbol str) exports)))
- (set! exports (cons (string-ci->symbol str) exports))))))))
+ (and
+ (string=? "* " (substring line 0 2))
+ (let ((<n> (substring? " <" line)))
+ (define csi (or (and <n>
+ (> (string-length line) (+ 3 <n>))
+ (string-index
+ "0123456789"
+ (string-ref line (+ 2 <n>)))
+ <n>)
+ (substring? ": " line)))
+ (and
+ csi
+ (let ((str (substring line 2 csi)))
+ (if (and (not (substring? " " str))
+ (not (memq (string-ci->symbol str) exports)))
+ (set! exports (cons (string-ci->symbol str) exports)))))))))
(else (loop (read-line port) (+ 1 iidx) ndxs))))))))