Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
This commit is contained in:
commit
c206caf969
|
@ -169,19 +169,21 @@ which case the entire range is returned."
|
||||||
(let ((length (length lis))
|
(let ((length (length lis))
|
||||||
(portion (match-string 1 index))
|
(portion (match-string 1 index))
|
||||||
(remainder (substring index (match-end 0))))
|
(remainder (substring index (match-end 0))))
|
||||||
(flet ((wrap (num) (if (< num 0) (+ length num) num)))
|
(flet ((wrap (num) (if (< num 0) (+ length num) num))
|
||||||
(mapcar
|
(open (lis) (if (and (listp lis) (= (length lis) 1)) (car lis) lis)))
|
||||||
(lambda (sub-lis) (org-babel-ref-index-list remainder sub-lis))
|
(open
|
||||||
(if (string-match "\\(\\([-[:digit:]]+\\):\\([-[:digit:]]+\\)\\|\*\\)"
|
(mapcar
|
||||||
portion)
|
(lambda (sub-lis) (org-babel-ref-index-list remainder sub-lis))
|
||||||
(mapcar (lambda (n) (nth n lis))
|
(if (string-match "\\(\\([-[:digit:]]+\\):\\([-[:digit:]]+\\)\\|\*\\)"
|
||||||
(apply 'number-sequence
|
portion)
|
||||||
(if (match-string 2 portion)
|
(mapcar (lambda (n) (nth n lis))
|
||||||
(list
|
(apply 'number-sequence
|
||||||
(wrap (string-to-number (match-string 2 portion)))
|
(if (match-string 2 portion)
|
||||||
(wrap (string-to-number (match-string 3 portion))))
|
(list
|
||||||
(list (wrap 0) (wrap -1)))))
|
(wrap (string-to-number (match-string 2 portion)))
|
||||||
(list (nth (wrap (string-to-number portion)) lis))))))
|
(wrap (string-to-number (match-string 3 portion))))
|
||||||
|
(list (wrap 0) (wrap -1)))))
|
||||||
|
(list (nth (wrap (string-to-number portion)) lis)))))))
|
||||||
lis))
|
lis))
|
||||||
|
|
||||||
(defun org-babel-ref-split-args (arg-string)
|
(defun org-babel-ref-split-args (arg-string)
|
||||||
|
|
Loading…
Reference in New Issue