From 47421514ba7f8c3251661e7aa59fc98f44c14832 Mon Sep 17 00:00:00 2001 From: Krzysztof Drewniak Date: Sat, 5 Mar 2011 16:58:28 -0600 Subject: [PATCH 3/4] Documented all my changed options.lisp: Fixed some small stuff, made is possible to autogenerate options docs stumpwm.texi.in: Added the docs for this stuff --- options.lisp | 10 +++++++--- stumpwm.texi.in | 31 ++++++++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/options.lisp b/options.lisp index f5608cb..fc3a062 100644 --- a/options.lisp +++ b/options.lisp @@ -45,12 +45,16 @@ (setf (slot-value struct symbol) t)))) struct)) - (defun show-help () - (loop for (symbol help . matches) in options-list do - (format t "~{~a~^, ~}~20,1T~a~%" matches help)))) + (defun show-help (&optional (stream t)) + (apply #'concatenate 'string + (loop for (symbol help . matches) in options-list collect + (format stream "~{~a~^, ~}~20,1T~a~%" matches help))))) (defun get-option (option &optional (struct *options*)) ;; Fallback in the event of code that fires off early [not needed any more] ;; (when (not struct) ;; (setf struct (parse-options (argv)))) (slot-value struct option)) + +(defvar *help-text* :autogenerates-for-the-docs + (format nil "@address@hidden verbatim~%" (show-help nil))) diff --git a/stumpwm.texi.in b/stumpwm.texi.in index 4b6cdd1..75cb89a 100644 --- a/stumpwm.texi.in +++ b/stumpwm.texi.in @@ -83,7 +83,8 @@ This document explains how to use The Stump Window Manager. @end ifinfo @menu -* Introduction:: +* Introduction:: +* Command-Line Options:: * Key Bindings:: * Commands:: * Message and Input Bar:: @@ -112,6 +113,10 @@ Introduction * Interacting with the Lisp process:: * Contact the StumpWM developers:: +Command-Line Options + +* List of Command-Line Options:: + Key Bindings * List of Default Keybindings:: @@ -168,7 +173,7 @@ Hacking @end detailmenu @end menu address@hidden Introduction, Key Bindings, Top, Top address@hidden Introduction, Command-Line Options, Top, Top @chapter Introduction StumpWM is an X11 window manager written entirely in Common Lisp. Its user interface goals are similar to ratpoison's but with an emphasis on @@ -304,7 +309,23 @@ is restricted to subscribers to keep spam out of the archives. The StumpWM IRC channel can be found on Freenode at @uref{irc://irc.freenode.net/#stumpwm, @code{#stumpwm}}. address@hidden Key Bindings, Commands, Introduction, Top address@hidden Command-Line Options, Key Bindings, Introduction, Top address@hidden Command-Line Options +StummpWM currently has very few command-line options. Please note that +to prevent option parsing by lisp, the sequence @code{--} must be on the +command line before the usage of the options @code{--help} and address@hidden + address@hidden +* List of Command-Line Options:: address@hidden menu + address@hidden List of Command-Line Options, , Command-Line Options, Command-Line Options address@hidden List of Command-Line Options +This is all the docs we have for now. +### *help-text* + address@hidden Key Bindings, Commands, Command-Line Options, Top @chapter Key Bindings StumpWM is controlled entirely by keystrokes and Lisp commands. It mimics GNU Screen's keyboard handling. StumpWM's default prefix key is @@ -402,6 +423,10 @@ Prompt for a shell command to run via @file{/bin/sh}. All output is discarded. If the screen is split into multiple frames, one split will be undone. If there is only one split, the effect will be the same as @kbd{C-t Q}. address@hidden C-t C-t C-L +End the stumpwm process, logging you out, after prompting to check if +you are sure you would like to do that. + @item C-t o @itemx C-t TAB If the screen is split into multiple frames, focus shifts to the -- 1.7.1