emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/org-edna d248565 21/72: Fix uses of substring


From: Ian Dunn
Subject: [elpa] scratch/org-edna d248565 21/72: Fix uses of substring
Date: Sun, 21 May 2017 21:11:21 -0400 (EDT)

branch: scratch/org-edna
commit d248565acc53cd87801f4b010fdf6f5deb54fdc1
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>

    Fix uses of substring
    
    * org-edna.el (org-edna-parse-form): Third argument to substring is TO, not 
LENGTH
---
 org-edna.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org-edna.el b/org-edna.el
index 9416aa0..1411982 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -21,7 +21,7 @@
     ;; Check for either end of string or an opening parenthesis
     (unless (or (equal pos (length form))
                 (equal (string-match-p "(" form pos) pos))
-      (signal 'invalid-read-syntax (substring form pos 1)))
+      (signal 'invalid-read-syntax (substring form pos (1+ pos))))
     ;; Parse arguments if we have any
     (when (equal (string-match-p "(" form pos) pos)
       ;; Move past the parenthesis
@@ -39,12 +39,12 @@
             (setq pos (match-end 0)))
           ;; The next character should either be a ',' or a ')'
           (unless (equal (string-match-p "[,)]" form pos) pos)
-            (signal 'invalid-read-syntax (substring form pos 1)))
+            (signal 'invalid-read-syntax (substring form pos (1+ pos))))
           ;; Move past a comma if there is one
           (when (equal (string-match-p "," form pos) pos)
             (cl-incf pos))))
       (unless (equal (string-match-p ")" form pos) pos)
-        (signal 'invalid-read-syntax (substring form pos 1)))
+        (signal 'invalid-read-syntax (substring form pos (1+ pos))))
       (setq args (seq-reverse args))
       ;; Move past the closing parenthesis
       (cl-incf pos))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]