[logaling-commit] logaling/logalimacs [master] use the typecase statement instead of the cond statement

Back to archive index

null+****@clear***** null+****@clear*****
Tue Jun 5 16:23:37 JST 2012


yuta yamada	2012-06-05 16:23:37 +0900 (Tue, 05 Jun 2012)

  New Revision: 550828c3db9df16dfe1e1eb75f59b965f8e2bd31

  Log:
    use the typecase statement instead of the cond statement

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+11 -11)
===================================================================
--- logalimacs.el    2012-06-05 16:03:17 +0900 (f9c8795)
+++ logalimacs.el    2012-06-05 16:23:37 +0900 (8844daf)
@@ -404,17 +404,17 @@
 (defun loga-make-popup (content)
   (let* ((converted-content (loga-convert-from-json content)))
     (setq loga-current-endpoint :popup)
-    (cond
-     ((listp converted-content)
-      (popup-cascade-menu converted-content
-                          :point (loga-decide-point)
-                          :width (loga-popup-width)
-                          :keymap loga-popup-menu-keymap))
-     ((stringp converted-content)
-      (popup-tip converted-content
-                 :margin loga-popup-margin
-                 :point (loga-decide-point)
-                 :width (loga-popup-width))))))
+    (typecase converted-content
+      (list
+       (popup-cascade-menu converted-content
+                           :point (loga-decide-point)
+                           :width (loga-popup-width)
+                           :keymap loga-popup-menu-keymap))
+      (string
+       (popup-tip converted-content
+                  :margin loga-popup-margin
+                  :point (loga-decide-point)
+                  :width (loga-popup-width))))))
 
 (defun loga-decide-point ()
   (let* ((half (/ (window-width) 2))




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