/[cmucl]/src/code/commandline.lisp
ViewVC logotype

Diff of /src/code/commandline.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by rtoy, Sat May 15 19:36:30 2010 UTC revision 1.23 by rtoy, Sun May 16 12:29:32 2010 UTC
# Line 195  Line 195 
195    any) for the switch.  Docstring describe the switch."    any) for the switch.  Docstring describe the switch."
196    (let ((gname (gensym))    (let ((gname (gensym))
197          (gfunction (gensym)))          (gfunction (gensym)))
198        (when docstring
199          (intl::note-translatable intl::*default-domain* docstring))
200        (when arg-name
201          (intl::note-translatable intl::*default-domain* arg-name))
202      `(let ((,gname ,name)      `(let ((,gname ,name)
203             (,gfunction ,function))             (,gfunction ,function))
204         (check-type ,gname simple-string)         (check-type ,gname simple-string)
205         (check-type ,gfunction (or symbol function) (intl:gettext "a symbol or function"))         (check-type ,gfunction (or symbol function) (intl:gettext "a symbol or function"))
206         (push (list ,gname ,docstring,arg-name ) *legal-cmd-line-switches*)         (push (list ,gname ,docstring ,arg-name) *legal-cmd-line-switches*)
207         (when ,gfunction         (when ,gfunction
208           (push (cons ,gname ,gfunction) *command-switch-demons*)))))           (push (cons ,gname ,gfunction) *command-switch-demons*)))))
209    
# Line 305  Line 309 
309                     :key #'car))                     :key #'car))
310      (destructuring-bind (name doc arg)      (destructuring-bind (name doc arg)
311          s          s
312        (format t "    -~A ~@[~A~]~%" name arg)        (format t "    -~A ~@[~A~]~%" name (intl:gettext arg))
313        ;; Poor man's formatting of the help string        ;; Poor man's formatting of the help string
314        (with-input-from-string (stream doc)        (with-input-from-string (stream (intl:gettext doc))
315          (loop for line = (read-line stream nil nil)          (loop for line = (read-line stream nil nil)
316             while line             while line
317             do (format t "~8T~A~%" line)))))             do (format t "~8T~A~%" line)))))

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.5