mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
deprecate arity access via (procedure-properties proc 'arity)
* libguile/procprop.h (scm_sym_arity): Deprecate. I didn't move it to deprecated.h though, because that might have some boot implications -- though I didn't check. * libguile/procprop.c (scm_procedure_properties) (scm_set_procedure_properties_x, scm_procedure_property) (scm_set_procedure_property_x): Deprecate access to a procedure's arity via procedure-properties. Users should use procedure-minimum-arity. * module/ice-9/channel.scm (eval): * module/ice-9/session.scm (arity): * module/language/tree-il/analyze.scm (validate-arity): Fix up instances of (procedure-property x 'arity) to use procedure-minimum-arity.
This commit is contained in:
parent
cb2ce54844
commit
3fc7e2c123
6 changed files with 38 additions and 28 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; guile-emacs.scm --- Guile Emacs interface
|
||||
|
||||
;; Copyright (C) 2001 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
;; Copyright (C) 2001, 2010 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -59,9 +59,6 @@
|
|||
;;;
|
||||
|
||||
(define (guile-emacs-export-procedure name proc docs)
|
||||
(define (procedure-arity proc)
|
||||
(assq-ref (procedure-properties proc) 'arity))
|
||||
|
||||
(define (procedure-args proc)
|
||||
(let ((source (procedure-source proc)))
|
||||
(if source
|
||||
|
@ -72,7 +69,7 @@
|
|||
((symbol? formals) `(&rest ,formals))
|
||||
(else (cons (car formals) (loop (cdr formals))))))
|
||||
;; arity -> emacs args
|
||||
(let* ((arity (procedure-arity proc))
|
||||
(let* ((arity (procedure-minimum-arity proc))
|
||||
(nreqs (car arity))
|
||||
(nopts (cadr arity))
|
||||
(restp (caddr arity)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue