* [PATCH] (Symbol Primitives): Add symbol, list->symbol, symbol-append.
@ 2009-05-30 3:34 Mark Polesky
0 siblings, 0 replies; 3+ messages in thread
From: Mark Polesky @ 2009-05-30 3:34 UTC (permalink / raw)
To: guile-devel
Hey there.
Did I do this right? If so, could someone apply this patch? I
didn't quite follow all the details in doc/maint/README, perhaps
because I'm on Windows, and I don't use emacs. Let me know.
Thanks.
- Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] (Symbol Primitives): Add symbol, list->symbol, symbol-append.
@ 2009-05-30 15:51 Mark Polesky
2009-05-30 23:41 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: Mark Polesky @ 2009-05-30 15:51 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
Mark Polesky wrote:
> Did I do this right? If so, could someone apply this patch? I
> didn't quite follow all the details in doc/maint/README, perhaps
> because I'm on Windows, and I don't use emacs. Let me know.
oops. here's the patch.
- Mark
[-- Attachment #2: 0001-Symbol-Primitives-Add-symbol-list-symbol-symbol-appe.patch --]
[-- Type: application/octet-stream, Size: 1597 bytes --]
From 311c5d19412ed37a37bec1c338c6c32d93f9e0ef Mon Sep 17 00:00:00 2001
From: Mark Polesky <markpolesky@yahoo.com>
Date: Fri, 29 May 2009 20:23:30 -0700
Subject: [PATCH] (Symbol Primitives): Add symbol, list->symbol, symbol-append.
---
doc/ref/api-data.texi | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index b529199..104280a 100755
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -4567,7 +4567,37 @@ strings returned by this procedure.
Most symbols are created by writing them literally in code. However it
is also possible to create symbols programmatically using the following
-@code{string->symbol} and @code{string-ci->symbol} procedures:
+procedures:
+
+@deffn {Scheme Procedure} symbol char@dots{}
+@rnindex symbol
+Return a newly allocated symbol made from the given character arguments.
+
+@example
+(symbol #\x #\y #\z) @result{} xyz
+@end example
+@end deffn
+
+@deffn {Scheme Procedure} list->symbol lst
+@rnindex list->symbol
+Return a newly allocated symbol made from a list of characters.
+
+@example
+(list->symbol '(#\a #\b #\c)) @result{} abc
+@end example
+@end deffn
+
+@rnindex symbol-append
+@deffn {Scheme Procedure} symbol-append . args
+Return a newly allocated symbol whose characters form the
+concatenation of the given symbols, @var{args}.
+
+@example
+(let ((h 'hello))
+ (symbol-append h 'world))
+@result{} helloworld
+@end example
+@end deffn
@rnindex string->symbol
@deffn {Scheme Procedure} string->symbol string
--
1.6.3.msysgit.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] (Symbol Primitives): Add symbol, list->symbol, symbol-append.
2009-05-30 15:51 [PATCH] (Symbol Primitives): Add symbol, list->symbol, symbol-append Mark Polesky
@ 2009-05-30 23:41 ` Neil Jerram
0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2009-05-30 23:41 UTC (permalink / raw)
To: Mark Polesky; +Cc: guile-devel
Mark Polesky <markpolesky@yahoo.com> writes:
> Mark Polesky wrote:
>
>> Did I do this right? If so, could someone apply this patch? I
>> didn't quite follow all the details in doc/maint/README, perhaps
>> because I'm on Windows, and I don't use emacs. Let me know.
Hi Mark,
Many thanks for contributing this patch. As it is more than a few
lines, we would need to get a copyright assignment from you before we
could incorporate it into Guile. If you'd be willing to do that,
please reply to me off-list and I'll send you the relevant
instructions.
There's also one technical problem with the patch: the new doc says
"newly allocated", which is wrong because these procedures all return
interned symbols - which means that an important aspect of them is
that they will return an existing symbol if there is one with the
right name.
Would you like to propose some new wording to allow for this?
Alternatively, and assuming that you're happy to do the copyright
assignment, I'm sure I could think up something when I apply the
patch.
Regards,
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-30 23:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-30 15:51 [PATCH] (Symbol Primitives): Add symbol, list->symbol, symbol-append Mark Polesky
2009-05-30 23:41 ` Neil Jerram
-- strict thread matches above, loose matches on Subject: below --
2009-05-30 3:34 Mark Polesky
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).