From: Kevin Ryde <user42@zip.com.au>
Subject: procedure-name on procedure with setter
Date: Sun, 03 Dec 2006 11:18:11 +1100 [thread overview]
Message-ID: <87zma56ddo.fsf@zip.com.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
I'm looking at this change
* eval.c (scm_m_define): Set the name of a procedure-with-setter too.
to get procedure names on srfi-17 replacement car etc. Currently
(use-modules (srfi srfi-17))
(procedure-name car)
=> #f
This would be for 1.6 too. Perhaps other non-closures should be
recognised by scm_m_define too. Would everything passing
scm_procedure_p be ok?
[-- Attachment #2: eval.c.proc-with-setter-name.diff --]
[-- Type: text/plain, Size: 557 bytes --]
--- eval.c.~1.405.2.6.~ 2006-10-02 12:18:26.000000000 +1000
+++ eval.c 2006-11-30 18:06:36.000000000 +1100
@@ -1235,7 +1235,8 @@
SCM tmp = value;
while (SCM_MACROP (tmp))
tmp = SCM_MACRO_CODE (tmp);
- if (SCM_CLOSUREP (tmp)
+ if ((SCM_CLOSUREP (tmp)
+ || SCM_PROCEDURE_WITH_SETTER_P (tmp))
/* Only the first definition determines the name. */
&& scm_is_false (scm_procedure_property (tmp, scm_sym_name)))
scm_set_procedure_property_x (tmp, scm_sym_name, variable);
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2006-12-03 0:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-03 0:18 Kevin Ryde [this message]
2006-12-12 22:16 ` procedure-name on procedure with setter Kevin Ryde
2006-12-14 23:05 ` Neil Jerram
2006-12-15 19:51 ` 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=87zma56ddo.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).