[clfswm-cvs] r410 - in clfswm: . contrib/server src
Philippe Brochard
pbrochard at common-lisp.net
Tue Feb 22 12:11:44 UTC 2011
Author: pbrochard
Date: Tue Feb 22 07:11:42 2011
New Revision: 410
Log:
src/clfswm.lisp (main): Use ASDF:SYSTEM-SOURCE-DIRECTORY instead of *LOAD-TRUENAME*. *LOAD-TRUENAME* is only bound during a call to LOAD. If one eval CLFSWM:MAIN in repl, BASE-DIR will be an empty string. Use ASDF:SYSTEM-SOURCE-DIRECTORY to fix it.
Modified:
clfswm/ChangeLog
clfswm/contrib/server/server.lisp
clfswm/src/clfswm-util.lisp
clfswm/src/clfswm.lisp
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Tue Feb 22 07:11:42 2011
@@ -1,3 +1,10 @@
+2011-02-22 Desmond O. Chang <dochang at gmail.com>
+
+ * src/clfswm.lisp (main): Use ASDF:SYSTEM-SOURCE-DIRECTORY instead
+ of *LOAD-TRUENAME*. *LOAD-TRUENAME* is only bound during a call to
+ LOAD. If one eval CLFSWM:MAIN in repl, BASE-DIR will be an empty
+ string. Use ASDF:SYSTEM-SOURCE-DIRECTORY to fix it.
+
2011-02-16 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm.lisp (main-unprotected): Add a close hook. And close
Modified: clfswm/contrib/server/server.lisp
==============================================================================
--- clfswm/contrib/server/server.lisp (original)
+++ clfswm/contrib/server/server.lisp Tue Feb 22 07:11:42 2011
@@ -35,7 +35,7 @@
(format t "Loading the clfswm server code... ")
-(pushnew (truename (concatenate 'string *contrib-dir* "contrib/" "server/")) asdf:*central-registry*)
+(pushnew (truename (merge-pathnames "server/" *contrib-dir*)) asdf:*central-registry*)
(dbg asdf:*central-registry*)
Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp (original)
+++ clfswm/src/clfswm-util.lisp Tue Feb 22 07:11:42 2011
@@ -50,7 +50,7 @@
(defun load-contrib (file)
"Load a file in the contrib directory"
- (let ((truename (concatenate 'string *contrib-dir* "contrib/" file)))
+ (let ((truename (merge-pathnames file *contrib-dir*)))
(format t "Loading contribution file: ~A~%" truename)
(when (probe-file truename)
(load truename :verbose nil))))
Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp (original)
+++ clfswm/src/clfswm.lisp Tue Feb 22 07:11:42 2011
@@ -244,10 +244,10 @@
(defun main-unprotected (&key (display (or (getenv "DISPLAY") ":0")) protocol
- (base-dir (directory-namestring (or *load-truename* "")))
+ (base-dir (asdf:system-source-directory :clfswm))
(read-conf-file-p t) (alternate-conf nil)
error-msg)
- (setf *contrib-dir* base-dir)
+ (setf *contrib-dir* (merge-pathnames "contrib/" base-dir))
(conf-file-name alternate-conf)
(when read-conf-file-p
(read-conf-file))
@@ -283,7 +283,7 @@
(defun main (&key (display (or (getenv "DISPLAY") ":0")) protocol
- (base-dir (directory-namestring (or *load-truename* "")))
+ (base-dir (asdf:system-source-directory :clfswm))
(read-conf-file-p t)
(alternate-conf nil))
(let (error-msg)
More information about the clfswm-cvs
mailing list