Browse Source

ob-core: Add safety test for results keyword value

* lisp/ob-core.el (org-babel-results-keyword): Add safety test.  Fix
  docstring.
Nicolas Goaziou 10 years ago
parent
commit
4947d25c7c
1 changed files with 7 additions and 2 deletions
  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.