[logaling-commit] logaling/logalimacs [master] Use with statement instead of local variable

Back to archive index

null+****@clear***** null+****@clear*****
Thu Jun 14 20:43:41 JST 2012


yuta yamada	2012-06-14 20:43:41 +0900 (Thu, 14 Jun 2012)

  New Revision: 5603025dded6c468c7a5bf23f14b7c5dc7c36c15

  Log:
    Use with statement instead of local variable

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+6 -5)
===================================================================
--- logalimacs.el    2012-06-14 20:42:38 +0900 (3f4bc0d)
+++ logalimacs.el    2012-06-14 20:43:41 +0900 (4d2edef)
@@ -344,8 +344,7 @@
 (defun loga-input ()
   (let* ((query (loga-from-symbol-to-string loga-current-command))
          (task loga-current-command)
-         (messages (concat query ": "))
-         record)
+         (messages (concat query ": ")))
     (case task
       ((or :add :update :config :delete :help :import :new
            :list :register :unregister)
@@ -355,9 +354,11 @@
       (:update (setq messages '("source: " "target(old): " "target(new): " "note(optional): ")))
       (:lookup (setq messages '("search: ")))
       (t (setq messages (list messages))))
-    (loop for message in messages do
-          (push (loga-query message) record))
-    (mapconcat 'identity (reverse record) " ")))
+    (loop with record
+          for message in messages do
+          (push (loga-query message) record)
+          finally return (mapconcat 'identity (reverse record) " "))))
+
 
 ;;;###autoload
 (defun loga-lookup-at-manually ()




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