[clfswm-devel] [RFC PATCH 2/2] Move date-string into tools package
Xavier Maillard
xma at gnu.org
Tue Mar 18 14:21:48 UTC 2008
date-string has nothing todo with clfswm-info code.
Move the date-string function definition into the tools package
and export the symbol `date-string'
Signed-off-by: Xavier Maillard <xma at gnu.org>
---
src/clfswm-info.lisp | 11 -----------
src/tools.lisp | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/clfswm-info.lisp b/src/clfswm-info.lisp
index 0305e0b..cf071f2 100644
--- a/src/clfswm-info.lisp
+++ b/src/clfswm-info.lisp
@@ -352,17 +352,6 @@ key is a character, a keycode or a keysym"
(show-key-binding *second-keys* *second-mouse*))
-(let ((days '("Lundi" "Mardi" "Mercredi" "Jeudi" "Vendredi" "Samedi" "Dimanche"))
- (months '("Janvier" "Fevrier" "Mars" "Avril" "Mai" "Juin" "Juillet"
- "Aout" "Septembre" "Octobre" "Novembre" "Decembre")))
- (defun date-string ()
- (multiple-value-bind (second minute hour date month year day)
- (get-decoded-time)
- (format nil " ~2,'0D:~2,'0D:~2,'0D ~A ~2,'0D ~A ~A "
- hour minute second
- (nth day days) date (nth (1- month) months) year))))
-
-
(defun show-date ()
"Show the current time and date"
(info-mode (list (date-string))))
diff --git a/src/tools.lisp b/src/tools.lisp
index 880cbee..d9d97c5 100644
--- a/src/tools.lisp
+++ b/src/tools.lisp
@@ -44,6 +44,7 @@
:escape-string
:first-position
:find-free-number
+ :date-string
:do-execute
:do-shell
:getenv
@@ -596,6 +597,16 @@ Useful for re-using the &REST arg after removing some options."
;; (transfert-stream in out (file-length in)))))
+(let ((days '("Lundi" "Mardi" "Mercredi" "Jeudi" "Vendredi" "Samedi" "Dimanche"))
+ (months '("Janvier" "Fevrier" "Mars" "Avril" "Mai" "Juin" "Juillet"
+ "Aout" "Septembre" "Octobre" "Novembre" "Decembre")))
+ (defun date-string ()
+ (multiple-value-bind (second minute hour date month year day)
+ (get-decoded-time)
+ (format nil " ~2,'0D:~2,'0D:~2,'0D ~A ~2,'0D ~A ~A "
+ hour minute second
+ (nth day days) date (nth (1- month) months) year))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--
1.5.4.4.685.g64f14.dirty
More information about the clfswm-devel
mailing list