From 78cb85fce0d94416dcc45cd0264eca8c11ceeec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= Date: Wed, 3 Jan 2018 12:57:19 +0100 Subject: [PATCH] Use aref instead of elt to access struct slots by number --- citeproc-term.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/citeproc-term.el b/citeproc-term.el index ecf6fe7..a28c0b7 100644 --- a/citeproc-term.el +++ b/citeproc-term.el @@ -41,16 +41,16 @@ "Compare terms T1 and T2. The comparison is based on the term fields except the last one, and relies on the alphabetical ordering of fields' string -content (see the function `citeproc--lib-string-content'). Return -1, -1 or 0 iff T1 precedes, succeeds or is equal according to the +content (see the function `citeproc-lib-s-content'). Return 1, -1 +or 0 iff T1 precedes, succeeds or is equal according to the ordering." (cond ((not t2) 1) ((not t1) -1) (t (let ((idx 1) (result 0)) (while (and (= result 0) (< idx 7)) - (let ((s1 (citeproc-s-content (elt t1 idx))) - (s2 (citeproc-s-content (elt t2 idx)))) + (let ((s1 (citeproc-s-content (aref t1 idx))) + (s2 (citeproc-s-content (aref t2 idx)))) (cond ((string< s1 s2) (setq result 1)) ((string> s1 s2) (setq result -1)))) (cl-incf idx)) result))))