]> code.delx.au - gnu-emacs-elpa/commitdiff
packages/arbitools.el: minor fixes
authorDavid Gonzalez Gandara <dggandara@member.fsf.org>
Tue, 3 May 2016 17:49:17 +0000 (19:49 +0200)
committerDavid Gonzalez Gandara <dggandara@member.fsf.org>
Tue, 3 May 2016 17:49:17 +0000 (19:49 +0200)
packages/arbitools/arbitools.el

index 8c43e7825df52c6c365c792be4c3becfee79c63d..76fe0bc279bd231fc06eb4dabd9ae157e3dbcedd 100644 (file)
   (interactive)
   (save-excursion
     (let ( (numberofrounds (arbitools-number-of-rounds))
+           (pointsstring   "")
            (points         0.0)
            (pointstosum    0.0)
            (roundcount     1))
         (while (<= roundcount numberofrounds)
           (beginning-of-line)
          (forward-char (+ 98 (* (- roundcount 1) 10))) ;; go to where the result is for each round
-          ;; FIXME: Use pcase?
+          (setq pointsstring (thing-at-point 'symbol))
           (cond ((string= (thing-at-point 'symbol) "1") (setq pointstosum 1.0))
                 ((string= (thing-at-point 'symbol) "+") (setq pointstosum 1.0))
                 ((string= (thing-at-point 'symbol) "=") (setq pointstosum 0.5))
     (let ((datachunk ""))
       (goto-char (point-min))
       (while (re-search-forward "^001" nil t)
-        (let* () ;; (linestring (thing-at-point 'line))
+        (let* ((linestring (thing-at-point 'line)))
           (beginning-of-line)
           (forward-char 89) ;; get the POS field
           (setq datachunk (thing-at-point 'word))
                  (save-excursion 
                    (while (re-search-forward "^013" nil t)
                     (let* ((linestringteam (thing-at-point 'line))
+                          (actualintegrant (string-to-number (substring linestringteam 40 44)))
                           (integrantcount 0)
                           (members 0))