[clfswm-cvs] [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1106-140-g8f5e6f3
Philippe Brochard
pbrochard at common-lisp.net
Sat Oct 13 12:09:11 UTC 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager".
The branch, master has been updated
via 8f5e6f374f4aaf1b96fb2943c7ef94b0f37006ce (commit)
from 60922e16b58b6397485dd3f83e734734e5a8f95b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8f5e6f374f4aaf1b96fb2943c7ef94b0f37006ce
Author: Michael Raitza <spacefrogg-clfswm at meterriblecrew.net>
Date: Sat Oct 13 14:07:58 2012 +0200
Refactored run-program-from-query-string.
diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp
index 6a298f3..841cbed 100644
--- a/src/clfswm-util.lisp
+++ b/src/clfswm-util.lisp
@@ -603,13 +603,21 @@
(let ((commands (command-in-path)))
(defun run-program-from-query-string ()
"Run a program from the query input"
- (multiple-value-bind (program return)
- (query-string "Run:" "" commands)
- (when (and (equal return :return) program (not (equal program "")))
- (setf *second-mode-leave-function* (let ((cmd (concatenate 'string "cd $HOME && " program)))
- (lambda ()
- (do-shell cmd))))
- (leave-second-mode)))))
+ (labels ((run-program-from-query-string-fun ()
+ (multiple-value-bind (program return)
+ (query-string "Run:" "" commands)
+ (when (and (equal return :return) program (not (equal program "")))
+ (let ((cmd (concatenate 'string "cd $HOME && exec " program)))
+ (lambda ()
+ (do-shell cmd)))))))
+ (let ((fun (run-program-from-query-string-fun)))
+ (when fun
+ (if *in-second-mode*
+ (progn
+ (setf *second-mode-leave-function* fun)
+ (leave-second-mode))
+ (funcall fun)))))))
+
-----------------------------------------------------------------------
Summary of changes:
src/clfswm-util.lisp | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
hooks/post-receive
--
CLFSWM - A(nother) Common Lisp FullScreen Window Manager
More information about the clfswm-cvs
mailing list