diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-08-25 23:35:22 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-08-25 23:45:14 +0200 |
commit | 11082518ee82c00f4aa0be3cebab2d92f241dbdf (patch) | |
tree | 04e32d48bbda65ea006bc18b5a00a0d06e9ca067 | |
parent | 3113c5fce90d6702950ae20043be0c6c115b856f (diff) | |
download | org-mode-11082518ee82c00f4aa0be3cebab2d92f241dbdf.tar.gz |
org-element: Tiny refactoring
* lisp/org-element.el (org-element-paragraph-parser): Tiny refactoring.
-rw-r--r-- | lisp/org-element.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org-element.el b/lisp/org-element.el index 87fa674..cd253e3 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -1740,7 +1740,7 @@ Assume point is at the beginning of the paragraph." ;; beginning of an item or a footnote reference. In that ;; case, we mustn't look for affiliated keywords since they ;; belong to the container. - (inner-par-p (/= (point-at-bol) (point))) + (inner-par-p (not (bolp))) (contents-begin (point)) (keywords (unless inner-par-p (org-element--collect-affiliated-keywords))) @@ -2431,7 +2431,7 @@ its beginning position." (let (beg) (when (and (re-search-forward "@@[-A-Za-z0-9]+:" limit t) (setq beg (match-beginning 0)) - (re-search-forward "@@" limit t)) + (search-forward "@@" limit t)) (cons 'export-snippet beg))))) @@ -2553,9 +2553,9 @@ Return value is a cons cell whose CAR is `inline-babel-call' and CDR is beginning position." (save-excursion ;; Use a simplified version of - ;; org-babel-inline-lob-one-liner-regexp as regexp for more speed. + ;; `org-babel-inline-lob-one-liner-regexp'. (when (re-search-forward - "\\(?:babel\\|call\\)_\\([^()\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\([^\n]*\\))\\(\\[\\(.*?\\)\\]\\)?" + "call_\\([^()\n]+?\\)\\(?:\\[.*?\\]\\)?([^\n]*?)\\(\\[.*?\\]\\)?" limit t) (cons 'inline-babel-call (match-beginning 0))))) |