[clfswm-cvs] r392 - in clfswm: . src
Philippe Brochard
pbrochard at common-lisp.net
Wed Dec 8 21:27:03 UTC 2010
Author: pbrochard
Date: Wed Dec 8 16:27:03 2010
New Revision: 392
Log:
src/clfswm-second-mode.lisp (sm-leave-function): Do not use *second-mode-program* anymore.
Modified:
clfswm/ChangeLog
clfswm/src/bindings-second-mode.lisp
clfswm/src/clfswm-second-mode.lisp
clfswm/src/clfswm-util.lisp
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Wed Dec 8 16:27:03 2010
@@ -1,3 +1,8 @@
+2010-12-08 Philippe Brochard <pbrochard at common-lisp.net>
+
+ * src/clfswm-second-mode.lisp (sm-leave-function): Do not use
+ *second-mode-program* anymore.
+
2010-12-07 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm-second-mode.lisp (*second-mode-leave-function*): New
Modified: clfswm/src/bindings-second-mode.lisp
==============================================================================
--- clfswm/src/bindings-second-mode.lisp (original)
+++ clfswm/src/bindings-second-mode.lisp Wed Dec 8 16:27:03 2010
@@ -74,7 +74,9 @@
`(define-second-key ,key
(defun ,name ()
,docstring
- (setf *second-mode-program* ,cmd)
+ (setf *second-mode-leave-function* (let ((cmd ,cmd))
+ (lambda ()
+ (do-shell cmd))))
(leave-second-mode))))
Modified: clfswm/src/clfswm-second-mode.lisp
==============================================================================
--- clfswm/src/clfswm-second-mode.lisp (original)
+++ clfswm/src/clfswm-second-mode.lisp Wed Dec 8 16:27:03 2010
@@ -29,9 +29,6 @@
(defparameter *sm-font* nil)
(defparameter *sm-gc* nil)
-(defparameter *second-mode-program* nil
- "Execute the program string if not nil")
-
(defparameter *second-mode-leave-function* nil
"Execute the function if not nil")
@@ -138,9 +135,6 @@
(show-all-children)
(display-all-frame-info)
(wait-no-key-or-button-press)
- (when *second-mode-program*
- (do-shell *second-mode-program*)
- (setf *second-mode-program* nil))
(when *second-mode-leave-function*
(funcall *second-mode-leave-function*)
(setf *second-mode-leave-function* nil))
Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp (original)
+++ clfswm/src/clfswm-util.lisp Wed Dec 8 16:27:03 2010
@@ -356,7 +356,9 @@
(multiple-value-bind (program return)
(query-string "Run:")
(when (and (equal return :return) program (not (equal program "")))
- (setf *second-mode-program* (concatenate 'string "cd $HOME && " program))
+ (setf *second-mode-leave-function* (let ((cmd (concatenate 'string "cd $HOME && " program)))
+ (lambda ()
+ (do-shell cmd))))
(leave-second-mode))))
More information about the clfswm-cvs
mailing list