소스 검색

using higher level function for checking list membership

  Thanks to Nicolas Goaziou for pointing this out

* lisp/ob-ref.el (org-babel-ref-at-ref-p): Use higher level function
  for testing list membership.
* lisp/ob.el (org-babel-read-result): Use higher level function for
  testing list membership.
  (org-babel-result-end): Use higher level function for testing list
  membership.
Eric Schulte 15 년 전
부모
커밋
e34033fec2
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      lisp/ob-ref.el
  2. 2 2
      lisp/ob.el

+ 1 - 1
lisp/ob-ref.el

@@ -215,7 +215,7 @@ to \"0:-1\"."
 Return nil if none of the supported reference types are found.
 Return nil if none of the supported reference types are found.
 Supported reference types are tables and source blocks."
 Supported reference types are tables and source blocks."
   (cond ((org-at-table-p) 'table)
   (cond ((org-at-table-p) 'table)
-	((org-list-in-item-p-with-indent 0) 'list)
+	((org-in-item-p) 'list)
         ((looking-at "^[ \t]*#\\+BEGIN_SRC") 'source-block)
         ((looking-at "^[ \t]*#\\+BEGIN_SRC") 'source-block)
         ((looking-at org-bracket-link-regexp) 'file)
         ((looking-at org-bracket-link-regexp) 'file)
         ((looking-at org-babel-result-regexp) 'results-line)))
         ((looking-at org-babel-result-regexp) 'results-line)))

+ 2 - 2
lisp/ob.el

@@ -1309,7 +1309,7 @@ following the source block."
   (let ((case-fold-search t) result-string)
   (let ((case-fold-search t) result-string)
     (cond
     (cond
      ((org-at-table-p) (org-babel-read-table))
      ((org-at-table-p) (org-babel-read-table))
-     ((org-list-in-item-p-with-indent 0) (org-babel-read-list))
+     ((org-in-item-p) (org-babel-read-list))
      ((looking-at org-bracket-link-regexp) (org-babel-read-link))
      ((looking-at org-bracket-link-regexp) (org-babel-read-link))
      ((looking-at org-block-regexp) (org-babel-trim (match-string 4)))
      ((looking-at org-block-regexp) (org-babel-trim (match-string 4)))
      ((looking-at "^[ \t]*: ")
      ((looking-at "^[ \t]*: ")
@@ -1500,7 +1500,7 @@ code ---- the results are extracted in the syntax of the source
   (save-excursion
   (save-excursion
     (cond
     (cond
      ((org-at-table-p) (progn (goto-char (org-table-end)) (point)))
      ((org-at-table-p) (progn (goto-char (org-table-end)) (point)))
-     ((org-list-in-item-p-with-indent 0) (- (org-list-bottom-point) 1))
+     ((org-in-item-p) (- (org-list-bottom-point) 1))
      (t
      (t
       (let ((case-fold-search t))
       (let ((case-fold-search t))
         (cond
         (cond