mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 15:00:21 +02:00
Revision: lcourtes@laas.fr--2006-libre/guile-core--cvs-head--0--patch-82
Creator: Ludovic Courtes <ludovic.courtes@laas.fr> Slight edits to `srfi-37.scm'. * srfi/srfi-37.scm: Don't use the SCSH comment syntax. Properly use the `Commentary:' syntax.
This commit is contained in:
parent
d4c382218d
commit
57e1ad75c7
1 changed files with 24 additions and 21 deletions
|
@ -15,26 +15,29 @@
|
||||||
;; You should have received a copy of the GNU Lesser General Public
|
;; You should have received a copy of the GNU Lesser General Public
|
||||||
;; License along with this library; if not, write to the Free Software
|
;; License along with this library; if not, write to the Free Software
|
||||||
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
#! Commentary
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;; To use this module with Guile, use (cdr (program-arguments)) as
|
||||||
|
;; the ARGS argument to `args-fold'. Here is a short example:
|
||||||
|
;;
|
||||||
|
;; (args-fold (cdr (program-arguments))
|
||||||
|
;; (let ((display-and-exit-proc
|
||||||
|
;; (lambda (msg)
|
||||||
|
;; (lambda (opt name arg)
|
||||||
|
;; (display msg) (quit) (values)))))
|
||||||
|
;; (list (option '(#\v "version") #f #f
|
||||||
|
;; (display-and-exit-proc "Foo version 42.0\n"))
|
||||||
|
;; (option '(#\h "help") #f #f
|
||||||
|
;; (display-and-exit-proc
|
||||||
|
;; "Usage: foo scheme-file ..."))))
|
||||||
|
;; (lambda (opt name arg)
|
||||||
|
;; (error "Unrecognized option `~A'" name))
|
||||||
|
;; (lambda (op) (load op) (values)))
|
||||||
|
;;
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
To use this module with Guile, use (cdr (program-arguments)) as
|
|
||||||
the ARGS argument to `args-fold'. Here is a short example:
|
|
||||||
|
|
||||||
(args-fold (cdr (program-arguments))
|
|
||||||
(let ((display-and-exit-proc
|
|
||||||
(lambda (msg)
|
|
||||||
(lambda (opt name arg)
|
|
||||||
(display msg) (quit) (values)))))
|
|
||||||
(list (option '(#\v "version") #f #f
|
|
||||||
(display-and-exit-proc "Foo version 42.0\n"))
|
|
||||||
(option '(#\h "help") #f #f
|
|
||||||
(display-and-exit-proc
|
|
||||||
"Usage: foo scheme-file ..."))))
|
|
||||||
(lambda (opt name arg)
|
|
||||||
(error "Unrecognized option `~A'" name))
|
|
||||||
(lambda (op) (load op) (values)))
|
|
||||||
!#
|
|
||||||
|
|
||||||
;;;; Module definition & exports
|
;;;; Module definition & exports
|
||||||
(define-module (srfi srfi-37)
|
(define-module (srfi srfi-37)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue