소스 검색

ob-core: Add safety test for results keyword value

* lisp/ob-core.el (org-babel-results-keyword): Add safety test.  Fix
  docstring.
Nicolas Goaziou 11 년 전
부모
커밋
4947d25c7c
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      lisp/ob-core.el

+ 7 - 2
lisp/ob-core.el

@@ -137,11 +137,16 @@ remove code block execution from the C-c C-c keybinding."
 
 (defcustom org-babel-results-keyword "RESULTS"
   "Keyword used to name results generated by code blocks.
-It should be RESULTS.  However any capitalization may be used."
+It should be \"RESULTS\".  However any capitalization may be
+used."
   :group 'org-babel
   :version "24.4"
   :package-version '(Org . "8.0")
-  :type 'string)
+  :type 'string
+  :safe (lambda (v)
+	  (and (stringp v)
+	       (eq (compare-strings "RESULTS" nil nil v nil nil t)
+		   t))))
 
 (defcustom org-babel-noweb-wrap-start "<<"
   "String used to begin a noweb reference in a code block.