Raymond Toy pushed to branch issue-379-gnu-style-options at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/commandline.lisp
    ... ... @@ -243,12 +243,12 @@
    243 243
     	(lisp::finish-standard-output-streams)
    
    244 244
     	(setf start next)))))
    
    245 245
     
    
    246
    -;; Docstrings should have lines longer than 72 characters so that we
    
    247
    -;; can print out the docstrings nicely on one line for help.
    
    248
    -;;                                                                     | <-- char 72
    
    246
    +;; Docstrings MUST consist of simple text and punctuation and
    
    247
    +;; newlines; no special markup is allowed.  When help is printed, the
    
    248
    +;; help string is automatically filled and wrapped to 80 columns.
    
    249 249
     (defswitch "eval" #'eval-switch-demon
    
    250 250
       "Evaluate the specified Lisp expression during the start up
    
    251
    -  sequence.  the value of the form will not be printed unless it is
    
    251
    +  sequence.  The value of the form will not be printed unless it is
    
    252 252
       wrapped in a form that does output."
    
    253 253
       "expression")
    
    254 254
     
    
    ... ... @@ -338,7 +338,7 @@
    338 338
     
    
    339 339
     (defswitch "quiet" nil
    
    340 340
       "Causes Lisp to start up silently, disabling printing of the herald
    
    341
    -  and causing most unnecessary noise, like GC messages,load messages,
    
    341
    +  and causing most unnecessary noise, like GC messages, load messages,
    
    342 342
       etc. to be suppressed.")
    
    343 343
     
    
    344 344
     (defswitch "debug-lisp-search" nil
    
    ... ... @@ -351,7 +351,8 @@
    351 351
     
    
    352 352
     (defun help-switch-demon (switch)
    
    353 353
       (declare (ignore switch))
    
    354
    -  (format t (intl:gettext "~&Usage: ~A <options>~2%") *command-line-utility-name*)
    
    354
    +  (format t (intl:gettext "~&Usage: ~A <options> [-- [app-args]*]~2%")
    
    355
    +	  *command-line-utility-name*)
    
    355 356
       (flet
    
    356 357
           ((get-words (s)
    
    357 358
     	 (declare (string s))
    
    ... ... @@ -379,15 +380,11 @@
    379 380
     		     :key #'car))
    
    380 381
           (destructuring-bind (name doc arg)
    
    381 382
     	  s
    
    382
    -	;; Print both -switch and --switch
    
    383
    -	(let ((arg-value (if arg (intl:gettext arg))))
    
    384
    -	  ;; If there's an arg, print the two switches on separate
    
    385
    -	  ;; lines.  Otherwise, we can use one line.
    
    386
    -	  (cond (arg
    
    387
    -		 (format t "    -~A ~@[~A~]~%" name arg-value)
    
    388
    -		 (format t "    --~A ~@[~A~]~%" name arg-value))
    
    389
    -		(t
    
    390
    -		 (format t "    -~A, --~A~%" name name))))
    
    383
    +	;; Print both -switch and --switch, and the optional arg
    
    384
    +	;; value.
    
    385
    +	(format t "    -~A|--~A   ~@[~A~]~%"
    
    386
    +		name name
    
    387
    +		(if arg (intl:gettext arg)))
    
    391 388
     
    
    392 389
     	;; Poor man's formatting of the help string
    
    393 390
     	(let ((*print-right-margin* 80))
    
    ... ... @@ -414,10 +411,6 @@
    414 411
     (defswitch "help" #'help-switch-demon
    
    415 412
       "Print out the command line options and exit")
    
    416 413
     
    
    417
    -#+nil
    
    418
    -(defswitch "-help" #'help-switch-demon
    
    419
    -  "Same as -help.")
    
    420
    -
    
    421 414
     (defun version-switch-demon (switch)
    
    422 415
       (declare (ignore switch))
    
    423 416
       (format t "~A~%" (lisp-implementation-version))
    
    ... ... @@ -425,10 +418,3 @@
    425 418
     
    
    426 419
     (defswitch "version" #'version-switch-demon
    
    427 420
       "Prints the cmucl version and exits")
    428
    -
    
    429
    -;; Make --version work for the benefit of those who are accustomed to
    
    430
    -;; GNU software.
    
    431
    -#+nil
    
    432
    -(defswitch "-version" #'version-switch-demon
    
    433
    -  "Prints the cmucl version and exits; same as -version")
    
    434
    -