소스 검색

ob-core.el (org-ts-regexp): Remove duplicate defconst'ing

* ob-core.el (org-ts-regexp): Remove duplicate defconst'ing.
(org-babel-result-regexp): Don't use `org-ts-regexp', use a
regexp string directly.

This is not the best solution, we should be able to use
`org-ts-regexp' here, but the dependencies makes it hard.
So let's not define org-ts-regexp twice, just use a raw
regexp instead, and add a FIXME warning about this.
Bastien Guerry 12 년 전
부모
커밋
c17e07e94f
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      lisp/ob-core.el

+ 2 - 3
lisp/ob-core.el

@@ -36,8 +36,6 @@
 (defvar org-babel-call-process-region-original)
 (defvar org-src-lang-modes)
 (defvar org-babel-library-of-babel)
-(defconst org-ts-regexp "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)>"
-  "Regular expression for fast time stamp matching.")
 (declare-function show-all "outline" ())
 (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS))
 (declare-function org-mark-ring-push "org" (&optional pos buffer))
@@ -456,7 +454,8 @@ specific header arguments as well.")
   (concat "^[ \t]*#\\+"
 	  (regexp-opt org-babel-data-names t)
 	  "\\(\\[\\([[:alnum:]]+\\)\\]\\|\\[\\[\\([[:alnum:]]+\\)\\]\\["
-	  org-ts-regexp
+	  ;; FIXME The string below is `org-ts-regexp'
+	  "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^\r\n>]*?\\)>"
 	  "\\]\\]\\)?\\:[ \t]*")
   "Regular expression used to match result lines.
 If the results are associated with a hash key then the hash will