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

* Re: and-let*, pretty-print unused vars
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Browning @ 2004-07-07 17:35 UTC (permalink / raw)


Kevin Ryde <user42@zip.com.au> writes:

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

I think these would also be fine for 1.6, if you like.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4


_______________________________________________
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

* Re: and-let*, pretty-print unused vars
  2004-07-07 17:35 ` Rob Browning
@ 2004-07-09 23:41   ` Kevin Ryde
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2004-07-09 23:41 UTC (permalink / raw)
  Cc: guile-devel

Rob Browning <rlb@defaultvalue.org> writes:
>
> I think these would also be fine for 1.6, if you like.

Oh, no, it's not really a bug fix if it has no visible effect :).


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