1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

remove program-name, program-documentation

* libguile/programs.h:
* libguile/programs.c (scm_program_name): Remove. procedure-name is
  sufficient.

* module/system/vm/program.scm (program-name): Remove from exports list.
  (program-documentation): Remove; procedure-documentation is
  sufficient.

* libguile/debug.c (scm_procedure_name): Remove special case for
  programs.

* module/language/tree-il/analyze.scm (validate-arity): Use
  procedure-name.

* module/ice-9/documentation.scm (object-documentation): Just use
  procedure-documentation, without special cases for programs.
This commit is contained in:
Andy Wingo 2010-04-17 15:17:24 +02:00
parent 07e424b753
commit 1e23b461ec
6 changed files with 5 additions and 33 deletions

View file

@ -1,4 +1,4 @@
;;;; Copyright (C) 2000,2001, 2002, 2003, 2006, 2009 Free Software Foundation, Inc.
;;;; Copyright (C) 2000,2001, 2002, 2003, 2006, 2009, 2010 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
@ -80,7 +80,6 @@
(define-module (ice-9 documentation)
:use-module (ice-9 rdelim)
:use-module ((system vm program) :select (program? program-documentation))
:export (file-commentary
documentation-files search-documentation-files
object-documentation)
@ -184,20 +183,13 @@
(cond ((null? files) documentation-files)
(else files))))
;; helper until the procedure documentation property is cleaned up
(define (proc-doc proc)
(or (procedure-documentation proc)
(procedure-property proc 'documentation)))
(define (object-documentation object)
"Return the docstring for OBJECT.
OBJECT can be a procedure, macro or any object that has its
`documentation' property set."
(or (and (procedure? object)
(proc-doc object))
(procedure-documentation object))
(object-property object 'documentation)
(and (program? object)
(program-documentation object))
(and (macro? object)
(object-documentation (macro-transformer object)))
(and (procedure? object)