Christophe Weblog Wiki Code Publications Music
avoid using cl primitives
authorChristophe Rhodes <csr21@cantab.net>
Tue, 23 Apr 2013 14:47:14 +0000 (15:47 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 23 Apr 2013 14:47:14 +0000 (15:47 +0100)
use nth where possible, multiple cars where not

iplayer.el

index 5b5b5c4e0b0bca3fb10293e60e7053a5f76c0429..8e883521d78706c251bf0e9d93785dcc705265a1 100644 (file)
     (setq iplayer-updating-cache-process nil
           iplayer-updating-cache-sentinel-info nil)
     (dolist (info info)
-      (let ((iplayer-command-frame (car info))
-            (iplayer-command-window (cadr info))
-            (iplayer-command-buffer (caddr info))
-            (keys (car (cdddr info)))
-            (function (cadr (cdddr info))))
+      (let ((iplayer-command-frame (nth 0 info))
+            (iplayer-command-window (nth 1 info))
+            (iplayer-command-buffer (nth 2 info))
+            (keys (nth 3 info))
+            (function (nth 4 info)))
         (when (and (frame-live-p iplayer-command-frame)
                    (window-live-p iplayer-command-window)
                    (buffer-live-p iplayer-command-buffer))
@@ -80,7 +80,7 @@
   (let (docstring interactive)
     (when (stringp (car body))
       (setq docstring (car body) body (cdr body)))
-    (when (and (consp (car body)) (eql (caar body) 'interactive))
+    (when (and (consp (car body)) (eql (car (car body)) 'interactive))
       (setq interactive (car body) body (cdr body)))
     `(defun ,name ,arglist
        ,@(when docstring (list docstring))