+2014-02-17 Ludovic Courtès <ludo@gnu.org>
+
+ * doc/guile.texi (Writing a Guile Pretty-Printer) <example>:
+ Remove 'string-begins-with' procedure. Add 'pretty-printer'
+ parameter to 'str-lookup-function' procedure. Look for
+ the "std::string<" prefix.
+ (Frames In Guile): Add 'frame' parameter to 'frame-read-var'.
+ Adjust description.
+
2014-02-17 Doug Evans <xdje42@gmail.com>
* Makefile.in (SUBDIR_GUILE_OBS): Resort alphabetically.
example above might be written.
@smallexample
-(define (string-begins-with str prefix)
- (= (string-prefix-length str prefix) (string-length prefix)))
-
-(define (str-lookup-function value)
+(define (str-lookup-function pretty-printer value)
(let ((tag (type-tag (value-type value))))
(and tag
- (string-begins-with tag "my::string<")
- (make-std-string-printer value))))
+ (string-prefix? "std::string<" tag)
+ (make-my-string-printer value))))
@end smallexample
Then to register this printer in the global printer list:
@xref{Symbol Tables In Guile}.
@end deffn
-@deffn {Scheme Procedure} frame-read-var variable @r{[}#:block block@r{]}
-Return the value of @var{variable} in this frame. If the optional
+@deffn {Scheme Procedure} frame-read-var frame variable @r{[}#:block block@r{]}
+Return the value of @var{variable} in @var{frame}. If the optional
argument @var{block} is provided, search for the variable from that
block; otherwise start at the frame's current block (which is
determined by the frame's current program counter). @var{variable}