CMUCL commit: src/code (commandline.lisp)
Raymond Toy
rtoy at common-lisp.net
Sat May 15 21:36:30 CEST 2010
Date: Saturday, May 15, 2010 @ 15:36:30
Author: rtoy
Path: /project/cmucl/cvsroot/src/code
Modified: commandline.lisp
Make the docstrings follow the CMUCL convention so that they are lined
up neatly when describe prints them.
------------------+
commandline.lisp | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
Index: src/code/commandline.lisp
diff -u src/code/commandline.lisp:1.21 src/code/commandline.lisp:1.22
--- src/code/commandline.lisp:1.21 Sat May 15 08:52:19 2010
+++ src/code/commandline.lisp Sat May 15 15:36:30 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/code/commandline.lisp,v 1.21 2010-05-15 12:52:19 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/code/commandline.lisp,v 1.22 2010-05-15 19:36:30 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -45,7 +45,7 @@
(defvar *batch-mode* nil
"When True runs lisp with its input coming from standard-input.
- If an error is detected returns error code 1, otherwise 0.")
+ If an error is detected returns error code 1, otherwise 0.")
(defstruct (command-line-switch (:conc-name cmd-switch-)
(:constructor make-cmd-switch
@@ -128,10 +128,10 @@
(setq str (pop cmd-strings))))))))
(defun get-command-line-switch (sname)
- "Accepts the name of a switch as a string and returns the value of the
- switch. If no value was specified, then any following words are returned.
- If there are no following words, then t is returned. If the switch was not
- specified, then nil is returned."
+ "Accepts the name of a switch as a string and returns the value of
+ the switch. If no value was specified, then any following words are
+ returned. If there are no following words, then t is returned. If
+ the switch was not specified, then nil is returned."
(let* ((name (if (char= (schar sname 0) #\-) (subseq sname 1) sname))
(switch (find name *command-line-switches*
:test #'string-equal
@@ -146,8 +146,8 @@
;;;; Defining Switches and invoking demons.
(defvar *complain-about-illegal-switches* t
- "When set, invoking switch demons complains about illegal switches that have
- not been defined with DEFSWITCH.")
+ "When set, invoking switch demons complains about illegal switches
+ that have not been defined with DEFSWITCH.")
;;; This is a list of lists consisting of the legal switch names,
;;; switch description, and argument description. The description and
@@ -183,15 +183,16 @@
(invoke-demon switch))))))
(defmacro defswitch (name &optional function docstring arg-name)
- "Associates function with the switch name in *command-switch-demons*. Name
- is a simple-string that does not begin with a hyphen, unless the switch name
- really does begin with one. Function is optional, but defining the switch
- is necessary to keep invoking switch demons from complaining about illegal
- switches. This can be inhibited with *complain-about-illegal-switches*.
-
- The optional arguments, arg-name and docstring, are used by -help
- to describe the switch. Arg-name is a string naming the argument
- (if any) for the switch. Docstring describe the switch."
+ "Associates function with the switch name in
+ *command-switch-demons*. Name is a simple-string that does not
+ begin with a hyphen, unless the switch name really does begin with
+ one. Function is optional, but defining the switch is necessary to
+ keep invoking switch demons from complaining about illegal switches.
+ This can be inhibited with *complain-about-illegal-switches*.
+
+ The optional arguments, arg-name and docstring, are used by -help to
+ describe the switch. Arg-name is a string naming the argument (if
+ any) for the switch. Docstring describe the switch."
(let ((gname (gensym))
(gfunction (gensym)))
`(let ((,gname ,name)
More information about the cmucl-commit
mailing list