unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* keyword cleanup patch
@ 2004-01-08 12:25 Richard Todd
  2004-01-10 12:48 ` Neil Jerram
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Todd @ 2004-01-08 12:25 UTC (permalink / raw)



[-- Attachment #1.1.1: Type: text/plain, Size: 1138 bytes --]

Something about my state of mind made me unhappy with the way one can
use either #:xxx or :xxxx in for modules, so (I'll probably regret
this later!) I dropped that feature in my local copy of guile.

Why are both syntaxes allowed in this one area, anyway?  I assume it's
a historical reason?  It's inconsistent with the rest of guile (AFAIK)
where you have to set a reader option for this behavior.

Anyway, while I doubt you'd be interested in _that_ patch, there are
two options that I thought I'd mention:

A.)  As a result of the change, (you can imagine), I had to
standardize all the guile-core code on #: in my local tree.  Having
all the code match is kind of nice, even if you allow both syntaxes.

....and/or....

B) I did stumble across a bug-fix and a cleanup that I thought you
might want to apply.  They are in the attached patch, and are:

1) ice-9/mapping.scm needed changes, since it has several keywords of
the form :xxx in it.  Maybe everyone that uses it also uses the reader
'prefix option.

2) A goops error message about missing keywords writes them as :xxx
instead of #:xxx.  Not a big deal, but...

Richard Todd

[-- Attachment #1.1.2: small.patch --]
[-- Type: text/plain, Size: 2156 bytes --]

Index: ice-9/mapping.scm
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/ice-9/mapping.scm,v
retrieving revision 1.7
diff -u -r1.7 mapping.scm
--- ice-9/mapping.scm	5 Apr 2003 19:04:27 -0000	1.7
+++ ice-9/mapping.scm	8 Jan 2004 11:30:41 -0000
@@ -102,8 +102,8 @@
 (define (hash-table-mapping . options)
   (let* ((size (or (and options (number? (car options)) (car options))
 		   71))
-	 (hash-proc (or (kw-arg-ref options :hash-proc) hash))
-	 (assoc-proc (or (kw-arg-ref options :assoc-proc)
+	 (hash-proc (or (kw-arg-ref options #:hash-proc) hash))
+	 (assoc-proc (or (kw-arg-ref options #:assoc-proc)
 			 (cond
 			  ((eq? hash-proc hash) assoc)
 			  ((eq? hash-proc hashv) assv)
@@ -111,7 +111,7 @@
 			  (else (error 'hash-table-mapping
 				       "Hash-procedure specified with no known assoc function."
 				       hash-proc)))))
-	 (delete-proc (or (kw-arg-ref options :delete-proc)
+	 (delete-proc (or (kw-arg-ref options #:delete-proc)
 			  (cond
 			   ((eq? hash-proc hash) delete!)
 			   ((eq? hash-proc hashv) delv!)
@@ -119,7 +119,7 @@
 			   (else (error 'hash-table-mapping
 					"Hash-procedure specified with no known delete function."
 					hash-proc)))))
-	 (table-constructor (or (kw-arg-ref options :table-constructor)
+	 (table-constructor (or (kw-arg-ref options #:table-constructor)
 				(lambda (len) (make-vector len '())))))
     (make-hash-table-mapping (table-constructor size)
 			     hash-proc
Index: oop/goops.scm
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/oop/goops.scm,v
retrieving revision 1.36
diff -u -r1.36 goops.scm
--- oop/goops.scm	20 Apr 2003 17:35:41 -0000	1.36
+++ oop/goops.scm	8 Jan 2004 11:30:42 -0000
@@ -1431,7 +1431,7 @@
 	   (set (get-keyword #:slot-set! (slot-definition-options s) #f))
 	   (env (class-environment class)))
        (if (not (and get set))
-	   (goops-error "You must supply a :slot-ref and a :slot-set! in ~S"
+	   (goops-error "You must supply a #:slot-ref and a #:slot-set! in ~S"
 			s))
        (list get set)))
     (else    (next-method))))

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

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

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

end of thread, other threads:[~2004-01-12 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08 12:25 keyword cleanup patch Richard Todd
2004-01-10 12:48 ` Neil Jerram
2004-01-12 17:31   ` Marius Vollmer
2004-01-10 16:18 ` Stephen Compall
2004-01-11  0:53   ` Richard Todd
2004-01-12 16:59 ` Marius Vollmer

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