changeset 18:3e6fcaaa7b5e

add put command operation.
author shinobu
date Sat, 10 Nov 2007 16:48:25 +0900
parents c213eff29303
children 3a876dbe0841
files redit-client-sm.el
diffstat 1 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/redit-client-sm.el	Sat Nov 10 15:51:38 2007 +0900
+++ b/redit-client-sm.el	Sat Nov 10 16:48:25 2007 +0900
@@ -187,14 +187,19 @@
   ;; (make-local-hook 'before-change-functions)
   ;; (make-local-hook 'after-change-functions)
     
-  (process-send-string redit-client-process
-		       (concat
-			(redit-pack
-			 (string-to-number redit-join-command)
-			 0 0 0 0 0))))
-
-
-
+  (if (string= "*scratch*" (buffer-name)) 
+    ;; JOIN
+    (process-send-string redit-client-process
+      (concat
+        (redit-pack
+          (string-to-number redit-join-command)
+            0 0 0 0 0)))
+    ;; PUT
+    (process-send-string redit-client-process
+      (concat
+        (redit-pack
+          (string-to-number redit-put-command)
+            0 0 0 0 0) (buffer-name)))))
 
 ;; 'get' is obsolete command
 ;; (defun redit-get-command ()