浏览代码

Do not prevent list items from being inside LaTeX blocks.

* org-list.el (org-search-backward-unenclosed): Do not prevent list
  items from being inside LaTeX blocks.
* org-list.el (org-search-forward-unenclosed): Do not prevent list
  items from being inside LaTeX blocks.
Nicolas Goaziou 15 年之前
父节点
当前提交
168a8b6007
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 4 8
      lisp/org-list.el

+ 4 - 8
lisp/org-list.el

@@ -276,10 +276,8 @@ valid or not, then makes sure the last one is valid."
      ((not (re-search-backward regexp bound (or noerror t) count)) nil)
      ((not (re-search-backward regexp bound (or noerror t) count)) nil)
      ;; match is not enclosed: return point.
      ;; match is not enclosed: return point.
      ((not (save-match-data
      ((not (save-match-data
-	     (or (org-in-regexps-block-p "^[ \t]*#\\+\\(begin\\|BEGIN\\)_\\([a-zA-Z0-9_]+\\)"
-					 '(concat "^[ \t]*#\\+\\(end\\|END\\)_" (match-string 2)))
-		 (org-in-regexps-block-p "^[ \t]*\\\\begin{\\([a-zA-Z0-9_]+\\)}"
-					 '(concat "^[ \t]*\\\\end{" (match-string 1) "}")))))
+	     (org-in-regexps-block-p "^[ \t]*#\\+\\(begin\\|BEGIN\\)_\\([a-zA-Z0-9_]+\\)"
+				     '(concat "^[ \t]*#\\+\\(end\\|END\\)_" (match-string 2)))))
       (point))
       (point))
      (t
      (t
       ;; else: we start again, searching one more occurrence away.
       ;; else: we start again, searching one more occurrence away.
@@ -297,10 +295,8 @@ valid or not, then makes sure the last one is valid."
      ((not (re-search-forward regexp bound (or noerror t) count)) nil)
      ((not (re-search-forward regexp bound (or noerror t) count)) nil)
      ;; match is not enclosed: return point.
      ;; match is not enclosed: return point.
      ((not (save-match-data
      ((not (save-match-data
-	     (or (org-in-regexps-block-p "^[ \t]*#\\+\\(begin\\|BEGIN\\)_\\([a-zA-Z0-9_]+\\)"
-					 '(concat "^[ \t]*#\\+\\(end\\|END\\)_" (match-string 2)))
-		 (org-in-regexps-block-p "^[ \t]*\\\\begin{\\([a-zA-Z0-9_]+\\)}"
-					 '(concat "^[ \t]*\\\\end{" (match-string 1) "}")))))
+	     (org-in-regexps-block-p "^[ \t]*#\\+\\(begin\\|BEGIN\\)_\\([a-zA-Z0-9_]+\\)"
+				     '(concat "^[ \t]*#\\+\\(end\\|END\\)_" (match-string 2)))))
       (point))
       (point))
      ;; else: we start again, searching one more occurrence away.
      ;; else: we start again, searching one more occurrence away.
      (t
      (t