[logaling-commit] logaling/logalimacs [master] apply loga-update command

Back to archive index

null+****@clear***** null+****@clear*****
Thu Jan 12 22:00:56 JST 2012


yuta yamada	2012-01-12 22:00:56 +0900 (Thu, 12 Jan 2012)

  New Revision: 202edb47754f2af3ab2a476cb23d42425675d362

  Log:
    apply loga-update command

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+14 -6)
===================================================================
--- logalimacs.el    2012-01-12 21:25:11 +0900 (43eda21)
+++ logalimacs.el    2012-01-12 22:00:56 +0900 (f1cf430)
@@ -56,12 +56,9 @@
            (loga-prompt-command task (read-string "loga register: ")))
           ((equal task "unregister")
            (loga-prompt-command task (read-string "loga unregister: ")))
-          ((equal task "update")
-           (loga-prompt-command task (read-string "loga update: ")))
-          ((equal task "version")
-           (loga-prompt-command task))
-          ((equal task "loga-fly-mode")
-           (loga-fly-mode))))))
+          ((equal task "update") (loga-update))
+          ((equal task "version") (loga-prompt-command task))
+          ((equal task "loga-fly-mode") (loga-fly-mode))))))
 
 (defun loga-prompt-command (cmd &optional arg help)
   "this function is wrapped program that pass to shell-command"
@@ -92,6 +89,17 @@
     (loga-prompt-command "add"
                          (concat "\"" source sep target sep note "\""))))
 
+(defun loga-update ()
+  "update to registered word"
+  (let*
+      ((src (loga-point-or-read-string "source word here: "))
+       (old (read-string "old target here: "))
+       (new (read-string "new target here: "))
+       (note (read-string "annotation here(optional): "))
+       (sep "\" \""))
+    (loga-prompt-command "update"
+                         (concat "\"" src sep old sep new sep note "\""))))
+
 (defun loga-lookup-in-hand-or-region (&optional word-for-fly-mode)
   "search word from logaling. if not mark region, search word type on manual. otherwise passed character inside region."
   (interactive)




More information about the logaling-commit mailing list
Back to archive index