unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* and-let*, pretty-print unused vars
@ 2004-07-04 23:49 Kevin Ryde
  2004-07-07 17:35 ` Rob Browning
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2004-07-04 23:49 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

        * and-let-star.scm (and-let*): Remove unused variable "val".
        * pretty-print.scm (read-macro-prefix): Remove unused variable "tail".

Looks like "val" was never needed once the whole "exp" is plonked into
the resulting "let".

"tail" might have been a cut and paste from the nearby read-macro?,
then not needed.


[-- Attachment #2: and-let-star.scm.val.diff --]
[-- Type: text/plain, Size: 877 bytes --]

--- and-let-star.scm.~1.5.~	2003-04-07 08:04:57.000000000 +1000
+++ and-let-star.scm	2004-07-02 18:49:27.000000000 +1000
@@ -1,7 +1,7 @@
 ;;;; and-let-star.scm --- and-let* syntactic form (draft SRFI-2) for Guile
 ;;;; written by Michael Livshin <mike@olan.com>
 ;;;;
-;;;; 	Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+;;;; 	Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -34,8 +34,7 @@
            ((null? (cdr exp))
             `(and ,(car exp) ,(expand (cdr vars) body)))
            (else
-            (let ((var (car exp))
-                  (val (cadr exp)))
+            (let ((var (car exp)))
               `(let (,exp)
                  (and ,var ,(expand (cdr vars) body)))))))
          (else

[-- Attachment #3: pretty-print.scm.tail.diff --]
[-- Type: text/plain, Size: 645 bytes --]

--- pretty-print.scm.~1.7.~	2003-04-07 08:04:59.000000000 +1000
+++ pretty-print.scm	2004-07-02 19:43:56.000000000 +1000
@@ -1,6 +1,6 @@
 ;;;; -*-scheme-*-
 ;;;;
-;;;; 	Copyright (C) 2001 Free Software Foundation, Inc.
+;;;; 	Copyright (C) 2001, 2004 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -42,7 +42,7 @@
     (cadr l))
 
   (define (read-macro-prefix l)
-    (let ((head (car l)) (tail (cdr l)))
+    (let ((head (car l)))
       (case head
         ((quote)            "'")
         ((quasiquote)       "`")

[-- Attachment #4: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-09 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-04 23:49 and-let*, pretty-print unused vars Kevin Ryde
2004-07-07 17:35 ` Rob Browning
2004-07-09 23:41   ` Kevin Ryde

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).