unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: and-let*, pretty-print unused vars
Date: Mon, 05 Jul 2004 09:49:15 +1000	[thread overview]
Message-ID: <87y8lzpc3o.fsf@zip.com.au> (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

             reply	other threads:[~2004-07-04 23:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-04 23:49 Kevin Ryde [this message]
2004-07-07 17:35 ` and-let*, pretty-print unused vars Rob Browning
2004-07-09 23:41   ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y8lzpc3o.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).