Re: [PATCH] nicer arglist for ADSF:OOS
Gary King <[email protected]> Thu, 30 Aug 2007 09:47:17 -0400
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
Here is my version of Tobias's patch with included docstring
goodness. Please holler if you don't like it. Otherwise, I'll commit
it soon.
Index: asdf.lisp
===================================================================
RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
retrieving revision 1.109
diff -u -w -u -r1.109 asdf.lisp
--- asdf.lisp 27 Jul 2007 02:58:19 -0000 1.109
+++ asdf.lisp 30 Aug 2007 13:46:22 -0000
@@ -899,6 +899,20 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; invoking operations
+(defvar *operate-docstring*
+ "Operate does three things:
+
+1. It creates an instance of `operation-class` using any keyword
parameters
+as initargs.
+2. It finds the asdf-system specified by `system` (possibly loading
+it from disk).
+3. It then calls `traverse` with the operation and system as arguments
+
+The traverse operation is wrapped in `with-compilation-unit` and error
+handling code. If a `version` argument is supplied, then operate also
+ensures that the system found satisfies it using the `version-
satisfies`
+method.")
+
(defun operate (operation-class system &rest args &key (verbose t)
version
&allow-other-keys)
(let* ((op (apply #'make-instance operation-class
@@ -932,9 +946,17 @@
(get-universal-time))
(return)))))))))
-(defun oos (&rest args)
- "Alias of OPERATE function"
- (apply #'operate args))
+(setf (documentation 'operate 'function)
+ *operate-docstring*)
+
+(defun oos (operation-class system &rest args &key force (verbose t)
version)
+ (declare (ignore force verbose version))
+ (apply #'operate operation-class system args))
+
+(setf (documentation 'oos 'function)
+ (format nil
+ "Short for _operate on system_ and an alias for the
`operate` function. ~&~&~a"
+ *operate-docstring*))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; syntax--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
cclan-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cclan-list