[sawfish: 5/9] News and docs for xterm and browser are improved.



commit 5bd59e4943c546678fef82ee8481a8e8b19a819f
Author: Teika kazura <teika lavabit com>
Date:   Thu Nov 19 18:03:11 2009 +0900

    News and docs for xterm and browser are improved.

 lisp/sawfish/wm/commands/launcher.jl |   24 ++++++++++++++----------
 man/news.texi                        |   15 +++++++++++++++
 man/sawfish.texi                     |   31 +++++++++++++++++++++++++++++--
 3 files changed, 58 insertions(+), 12 deletions(-)
---
diff --git a/lisp/sawfish/wm/commands/launcher.jl b/lisp/sawfish/wm/commands/launcher.jl
index 0caf38a..095a147 100644
--- a/lisp/sawfish/wm/commands/launcher.jl
+++ b/lisp/sawfish/wm/commands/launcher.jl
@@ -1,4 +1,4 @@
-;; user.jl -- command to launch an xterm/brower and more
+;; launcher.jl -- command to launch external apps, xterm & browser
 ;;
 ;; Copyright (C) 2000 John Harper <john dcs warwick ac uk>
 ;;
@@ -18,7 +18,8 @@
 ;; along with sawfish; see the file COPYING.  If not, write to
 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
-(define-structure sawfish.wm.commands.user
+;; This module was renamed from xterm in Sawfish-1.6.
+(define-structure sawfish.wm.commands.launcher
 
     (export xterm
 	    browser)
@@ -32,33 +33,36 @@
 	  sawfish.wm.custom
 	  sawfish.wm.commands)
 
-  (defgroup apps "Default Applications" :group misc)
+  (defgroup apps "External Applications" :group misc)
 
   (defcustom xterm-program "xterm"
-    "The program launched by the `xterm' command."
+    "The program launched by the `xterm' function. Interpreted by shell."
     :type string
     :group (misc apps))
 
   (defcustom browser-program "www-browser"
-    "The program launched by the `browser' command."
+    "The program launched by the `browser' function. Interpreted by shell."
     :type string
     :group (misc apps))
 
   (define (xterm #!optional command)
-    "Start a new xterm."
+    "Start a new terminal. Optional argument `COMMAND' is passed to the
+terminal with -e option, so for most, including xterm, it can contain
+arguments to be passed."
     (if (not command)
 	(system (format nil "%s >/dev/null 2>&1 </dev/null &"
 			xterm-program))
+      ;; Note that -e has to be the last argument. See man xterm.
       (system (format nil "%s -e %s >/dev/null 2>&1 </dev/null &"
 		      xterm-program command))))
 
-  (define (browser #!optional website)
-    "Start a new browser instance"
-    (if (not website)
+  (define (browser #!optional url)
+    "Start a new browser instance."
+    (if (not url)
         (system (format nil "%s >/dev/null 2>&1 </dev/null &"
 			browser-program))
       (system (format nil "%s %s >/dev/null 2>&1 </dev/null &"
-                      browser-program website))))
+                      browser-program url))))
 
   ;;###autoload
   (define-command 'xterm xterm #:class 'default)
diff --git a/man/news.texi b/man/news.texi
index 75caea7..c33ccd3 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -68,6 +68,21 @@ too.
 You can't set any arguments to pass from this variable. If you want to
 give arguments or redirect output, write a wrapper
 program. (@pxref{FAQ}, ``Sound support'' section.)
+
+ item Xterm and browser changes
+
+Module @code{sawfish.wm.commands.xterm} is renamed to
+ code{sawfish wm commands launcher}  Option @code{xterm-args} is
+dropped. If you use it, simply append the value to @code{xterm-program}.
+
+Customization group is changed from @code{misc} to @code{External
+Applications}. 
+
+The functinon @code{display-url} is renamed to @code{browser}, now
+defined in the module cited above. Variable @code{display-url-command} is
+renamed to @code{browser-program}.
+ item Browser changes
+
 @end itemize
 @item Bugs fixed:
 @itemize @minus
diff --git a/man/sawfish.texi b/man/sawfish.texi
index 9ac071e..9c4894f 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -91,6 +91,7 @@ last updated @value{UPDATED} for Sawfish version @value{VERSION}.
 * Keymaps::			Bindings events to actions
 * Event Loop::			Handling input events
 * Miscellaneous Functions::	Useful features
+* External Applications::       Invocation of external applications
 * Standard Hooks::		Hooking into wm actions
 * Standard Properties::		Window properties
 * Session Management::		Saving state across sessions
@@ -5723,7 +5724,7 @@ Returns the number of X events waiting to be handled.
 @end defun
 
 
- node Miscellaneous Functions, Standard Hooks, Event Loop, Top
+ node Miscellaneous Functions, External Applications, Event Loop, Top
 @chapter Miscellaneous Functions
 @cindex Miscellaneous functions
 
@@ -6339,7 +6340,33 @@ Remove all duplicates values from @var{lst}, using @code{eq}.  The
 order of elements is not preserved.
 @end defun
 
- node Standard Hooks, Standard Properties, Miscellaneous Functions, Top
+ node External Applications, Standard Hooks, Miscellaneous Functions, Top
+ chapter External Applications
+ cindex External applications
+
+There're some functions and variables for invocation of external applications.
+
+ defvr {Customizable} xterm-program
+The program launched by the @code{xterm} function. Interpreted by shell.
+ end defvr
+
+ deffn Function xterm #!optional command
+ deffnx Command xterm
+Start a new terminal. Optional argument @var{COMMAND} is passed to the
+terminal with @code{-e} option, so for most, including xterm, it can contain
+arguments to be passed.
+ end deffn
+
+ defvr {Customizable} browser-program
+The program launched by the @code{browser} function. Interpreted by shell.
+ end defvr
+
+ deffn Function browser #!optional url
+ deffnx Command browser
+Start a new browser instance. Visit @var{URL} if supplied.
+ end deffn
+
+ node Standard Hooks, Standard Properties, External Applications, Top
 @chapter Standard Hooks
 @cindex Standard hooks
 @cindex Hooks, standard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]